Perl 6 - the future is here, just unevenly distributed

IRC log for #webwork, 2013-09-25

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

All times shown according to UTC.

Time Nick Message
01:20 rbeezer joined #webwork
09:17 lova joined #webwork
09:17 lova left #webwork
13:16 goehle joined #webwork
13:30 goehle hey mgage
14:13 mgage_ joined #webwork
16:00 goehle hey mgage
16:06 aubreyja joined #webwork
16:06 aubreyja joined #webwork
16:07 goehle hay aubreyja
16:07 goehle hey?
16:07 goehle thats better
16:07 goehle mind if I ask a js question
16:09 aubreyja sup?
16:10 aubreyja (disclaimer: I'm not very experienced with js)
16:13 goehle ah
16:13 goehle this is more of a philosophy question
16:14 goehle I was thinking about adding js code to math4
16:14 goehle which would blank the page until the js had finished running
16:14 goehle and then show it
16:14 goehle so that you dont see it half rendered
16:14 aubreyja oh, I'm very experienced in giving my philosophical opinions.
16:14 goehle but the issue is that if I do that then anything that stops the js from running (like a typo or msising object) stops the page from rendering.
16:14 aubreyja is that a problem? I haven't seen that on math4
16:14 goehle it is on my machine
16:14 goehle and anything slower
16:15 aubreyja ah, what about moving the js around - say loading nonessential js at the bottom of the page...
16:15 aubreyja (or 'not-always-essential')
16:17 aubreyja in fact, I think I saw this move somewhere in the bootstrap docs
16:17 goehle ah
16:17 goehle try catch will fix this problem
16:17 aubreyja sounds right
17:13 mgage aubreyja: hi
17:13 aubreyja Hi - how'd it go yesterday? Sorry I couldn't make it back, lunch was 12:36-1:36
17:33 goehle hey mgage
17:34 mgage aubreyja: goehle:   sorry -- student -- I'm back again
17:34 goehle np
17:34 mgage aubreyja:  I wanted to ask about the CAPA problems with D. Young   did that get fixed?
17:35 aubreyja no, just getting back to it - probably a simple installation issue
17:35 mgage the presentations went fine -- possibly went on too long (my fault  - I wanted to show production use of essayQuestions)
17:35 mgage aubreyja:  there is a macro file that needs to be loaded -- it contains the capa version of evaluation CAPA_EV    --
17:36 mgage so that is what is causing the complaint -- no idea why it can't find that macro file
17:37 mgage it's called PG_CAPAmacros.pl
17:39 goehle could one of you take a look at problem 3 from the demo set on develop
17:39 goehle is the solution knows stuff supposed to work like that?
17:42 mgage do you mean the first solution knowl in problem 3? of Demo set?
17:45 mgage I think putting a $PAR in front of the "Find f'(4)" statement makes the problem work better.
17:45 goehle it does
17:45 mgage Note it 's a pretty old problem -- using $SOL to print out solution isn't usually done these days
17:45 goehle so this is a problem specific bug
17:46 goehle ok
17:46 goehle not to wrory
17:46 aubreyja hmm...Mike - this is strange...the capa problems I'm looking at have no loadMacros() statements...they look like pg files to be embedded in other pg files...
17:46 aubreyja maybe kenneth linked to the wrong dir
17:47 mgage I think so --- the question of whether to include SOLUTION as part of the macro or let an instructor add it has been going back and forth.  It's lead to the complaints that in some cases you have two SOLUTION   headings.
17:47 aubreyja I see /opt/webwork/libraries/CAPA
17:47 aubreyja and under that CAPA_MCTools and CAPA_Tools
17:47 mgage there are auxiliary caps files  -- and they are kept in CAPA_MCTools and CAPA_Tools
17:48 aubreyja ok, this is the problem then - are the actual capa probs not under libraries/CAPA?
17:48 mgage take a look at the set up on test courses and duplicate that ----- that may not be the only way to organize things but it works on test courses and that way MAA will just have one version of the organization.
17:49 aubreyja ok, found them...rochester_physics_problib
17:51 mgage yeah -- just found them as well
17:52 mgage actually you can probably improve the organization on test courses -- and we can set up the caps problems so they can be more easily distributed.
17:52 mgage make sure the course physics_library still works if you do this.
17:52 goehle hey Mike, I asked Jason about this, but wanted other input
17:52 goehle I dont like how you can sometimes see the page half rendered in math4
17:52 goehle (the html will pop up before the javascript kicks in)
17:53 goehle I wanted to hide the body of the page until the javascript is done then show it
17:53 goehle the issue with this is that if the js fails for some reason the page doesn't get shown at all
17:54 goehle is it worth it?
17:54 mgage I don't like that option.  I can live with visual glitches better than mysterious disappearances
17:54 goehle fair enough
17:55 mgage moving where the javascript loads might work -- there is a lot of mumbo jumbo about this and whether javascript should load first or last
17:55 mgage current mantra seems to be last but I remember when it was definitely supposed to be loaded first in the HEAD
17:56 goehle I dont know that that will help too much
17:56 goehle the issue is that I am changing a lot of css with javascript
17:56 mgage aubreyja: it's not urgent but we should organize CAPA so that it can be distributed from github -- probably in sited webwork-open-problem-library but not in OpenProblemLibrary
17:57 aubreyja yeah, I'll track that down - not sure where rochester_physics_problib even is now besides our old svn
17:57 mgage I think we need to talk to people more expert than I -- Davide or David Gage might have suggestions -- each of them has used a lot of javaScript.  Peter might as well.
17:58 goehle sure
17:58 goehle I'll ask around, but leave things for now
17:58 goehle what do you want to do about the xss stuff
17:58 mgage that sounds like the right plan for me.
18:00 mgage I'm still catching up on that stuff -- I think I'll need to read closely what HTML::Scrubber does and how it differs from HTML::Entities.  Davide seems not to want to use HTML::Scrubber unless absolutely necessary -- but I haven't figured out exactly why yet.  Possibly minimalism (and I'm a fan of that in most cases) and/or not implementing something that will block other innovations later
18:00 goehle umm, html scrubber actually removes stuff
18:00 goehle so things will dissipear
18:00 goehle entities just encodes it so that it isn't rendered
18:00 goehle so with scrubber ifyou have <script>alert('hi')</script>
18:00 goehle that would get mysteriously deleted
18:00 goehle with entitities it would get printed out but not run
18:01 goehle http://search.cpan.org/~nigelm/HTML-Scrubber-0.09/lib/HTML/Scrubber.pm
18:01 goehle scrubber can be selective.  For example, it can be set to let all html through except script tags
18:03 goehle Davide says "If you want to allow them to be passed HTML strings,
18:03 goehle then that means that caller will have to do the needed escaping.  I would not
18:03 goehle use HTML::Scrubber in that case, since you would then be limiting the ability
18:03 goehle of trusted code to pass legitimate HTML (trusted meaning other parts of
18:03 goehle WeBWorK).  If you are allowing HTML, then I think it should be the
18:03 goehle responsibility of the calling code to sanitize the HTML that it passes to
18:03 goehle addmessage (it is the one that knows where the HTML came from, not add
18:03 goehle message).If you want to allow them to be passed HTML strings,
18:03 goehle then that means that caller will have to do the needed escaping.  I would not
18:03 goehle use HTML::Scrubber in that case, since you would then be limiting the ability
18:03 goehle of trusted code to pass legitimate HTML (trusted meaning other parts of
18:03 goehle WeBWorK).  If you are allowing HTML, then I think it should be the
18:03 goehle responsibility of the calling code to sanitize the HTML that it passes to
18:03 goehle addmessage (it is the one that knows where the HTML came from, not add
18:03 goehle message)."
18:05 mgage I don't fully agree with that part of what he was saying since I think lots of coders will use add message without thinking about where the source is coming from.
18:05 mgage we could start to use taint in an organized way to determine whether a variable contains content from a potentially unsafe source.
18:05 goehle yeah, thats what I was thinking
18:06 mgage I'm more willing to think about not using HTML at all in those messages -- so far it's use doesn't seem to be essential.
18:06 goehle i'm going to post a file
18:06 goehle which has all of the instances of html beign used in addmessage that I could find
18:07 mgage in that case we could use HTML::Entities and someone putting the wrong stuff in the message would see gobbled gook -- which is better than seeing nothing
18:08 mgage by the way I think the discussion on this issue on bugzilla has been really good and is an example of how it should be carried out so that there is a record of the issues involved.
18:08 mgage I'd suggest posting the file to the bugzilla thread
18:09 mgage even discussing it here or on ww-devel --- while there is a record if you know how to look -- it's not as easily accessible as it is on bugzilla.
18:09 mgage I see you have done that
18:20 _ilbot joined #webwork
18:20 Topic for #webwork is now WeBWorK (http://webwork.maa.org) is an open-source online homework system for math and sciences courses. WeBWorK is supported by the MAA and the NSF. | Release notes: http://goo.gl/Ry5HN | Channel logged at http://goo.gl/jELTn
18:24 _ilbot joined #webwork
18:24 Topic for #webwork is now WeBWorK (http://webwork.maa.org) is an open-source online homework system for math and sciences courses. WeBWorK is supported by the MAA and the NSF. | Release notes: http://goo.gl/Ry5HN | Channel logged at http://goo.gl/jELTn
18:24 goehle this would prevent using tables in output from answer evaluators
18:24 goehle I was just going to encode warnings again
18:24 goehle but I dont know if that is still a problem
18:33 goehle ah
18:34 goehle its not
18:34 goehle nowadays pg warnings are formatted and dealth wtih seperately
18:36 mgage kk -- the warning system is still a bit of a mess -- Davide has done some nice work with catching stuff inside Translator.pm   -- although I might have destroyed some of those effects later.  I have tried to create two separate channels   warning_message() and debug_message() in PGcore which are alternative ways of passing out information.
18:36 mgage Unfortunately they won't say anything if the problem fails to compile due to a syntax error -- since the messages are stored and only released when ENDDOCUMENT is run.
18:38 _ilbot joined #webwork
18:38 Topic for #webwork is now WeBWorK (http://webwork.maa.org) is an open-source online homework system for math and sciences courses. WeBWorK is supported by the MAA and the NSF. | Release notes: http://goo.gl/Ry5HN | Channel logged at http://goo.gl/jELTn
18:38 mgage afk
18:39 _ilbot joined #webwork
18:39 Topic for #webwork is now WeBWorK (http://webwork.maa.org) is an open-source online homework system for math and sciences courses. WeBWorK is supported by the MAA and the NSF. | Release notes: http://goo.gl/Ry5HN | Channel logged at http://goo.gl/jELTn
20:22 goehle well mgage
20:22 goehle after looking at it more
20:22 goehle I do think scrubber (or something similar) is the way to go
20:22 goehle what I didn't realize is that people use addmessage directly
20:22 goehle and they do so in creative ways
23:05 mgage_ joined #webwork

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