Perl 6 - the future is here, just unevenly distributed

IRC log for #webwork, 2014-08-27

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

All times shown according to UTC.

Time Nick Message
00:56 mgage joined #webwork
04:31 rbeezer joined #webwork
05:37 rbeezer_ joined #webwork
11:08 mgage joined #webwork
12:57 goehle joined #webwork
13:05 mgage joined #webwork
14:20 shdw_work joined #webwork
15:19 ilbot3 joined #webwork
15:19 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
15:38 rbeezer joined #webwork
15:41 aubreyja joined #webwork
15:41 aubreyja joined #webwork
15:55 mgage joined #webwork
16:11 mgage joined #webwork
16:40 mgage joined #webwork
16:52 mgage goehle:
16:53 goehle hey,  Moving the pretty print declaration in PG.pl to after the $PG definition and using $PG->pretty_print
16:53 goehle seemed to work
16:53 goehle is ther eanything else that uses PGcore->pretty_print?
16:53 goehle and is $PG always going to be defined
16:54 mgage nothing else uses PGcore at the moment — and if it does it will have to define displayMode explicitly since PGcore->  provides access to methods but not to data.
16:54 goehle well the problem is tha tif it uses PGcore
16:55 goehle then the code will fail when it tries to do $self->displayMode
16:55 goehle (we would need to add a ref check to get around that)
16:55 goehle PGcore has some PGcore->pretty_print in there
16:55 mgage $PG->pretty_print gives access to methods and to data if $PG contains a PGcore object
16:55 goehle but I changed it to $self->pretty_print
16:55 goehle Right
16:56 mgage well — that’s why my sample had a second check that $displayMode gets defined
16:56 goehle its not that it doenst get defined, its that webwork dies with an error about not being able to use $self as a hash reference
16:57 mgage good point — putting in a reference check on self would be better — perhaps a check on displayMode as well
16:58 mgage as to whether $PG is defined or not — it is created in the DOCUMENT() subroutine
16:58 mgage so after that it is defined.
16:58 goehle It may not be super necessary.  This is the first time pretty_print is being introduced as a method inside PGcore, so its not like there is a history of PGcore->pretty_print,  we just have to make sure we dont introduce it
16:59 goehle so $PG is an our
16:59 goehle I have pretty_print after the our declaration but before DOCUMENT
16:59 goehle which is fine because the things calling it are calling it after DOCUMENT
16:59 goehle but we might be in trouble if something before DOCUMENT calls it
16:59 goehle (if I understand that correctly)
17:00 goehle I can move the subroutine to after DOCUMENT, but I dont' think that fixes the issue
17:01 mgage no it doesn’t — and we agree on predicting the behavior.
17:02 mgage I think I was using pretty_print for debugging in PG.pl which is read and executed before DOCUMENT() — all of the rest of the files are included by loadMacros and so should be read after DOCUMENT and  $main::PG should be a complete object with a hash table that contains all the environment variable.
17:03 mgage I’m fine with using $PG->pretty_print and then doing a bunch of testing.
17:03 goehle ok
17:04 mgage I just updated my gage_test course on github if you want some material https://github.com/mgage/gage_test
17:04 mgage I think it will work for you
17:06 goehle testing for this branch?
17:07 mgage the course gage_test has a bunch of problems specifically designed to unit test certain parts of PG (mostly) — for example the non_null table that I posted comes from a problem I just constructed.
17:08 mgage it would need to be cleaned up to be generally useful — I use it to help check that things still work — but I’ve never gotten around to making it pretty so that it was easy for others to use
17:09 goehle ok
17:09 goehle btw
17:09 mgage the homework set checking pretty_print and not_null is pretty straight forward however.
17:09 goehle do we use IO::WW1 or IO::Daemon2?
17:09 mgage no — removing those for develop is fine (I wouldn’t do it for the hot fix )
17:10 goehle ok
17:10 mgage this is a pull request that is a bit hard to debug ,
17:10 mgage I still haven’t tested it in tex mode
17:10 mgage brb
17:13 mgage doorbell — I also haven’t checked it yet on perl past 5.12
17:13 goehle ah
17:14 goehle I dont know that I have access to 5.12.  I"m using 5.14
17:14 mgage eventually I can check it on 5.14 and 5.16 but I need to do some class preparation now
17:14 goehle ok
17:15 mgage incidentally  you can use $^V in a PG problem to find the version of perl that the server is using — it might not always be the same as the one you get on the command line.
17:15 goehle interesting
17:15 * aubreyja recommends perlbrew for testing different perls easily
17:16 goehle why is the last problem on set test_notnull_and_prettyprint the default one?
17:16 mgage that works for the command line but it doesn’t change the perl used by the apache server (unless you rebuild the server each time).  — I tried that earlier this summer.
17:16 mgage I think Vagrant is a better answer (or VMware ) still not sure how much Vagrant adds.
17:17 mgage I made three blank problems and only used two of them.
17:17 goehle ah ok
17:17 goehle and are you supposed to be able to do hardcopies of those problems?
17:17 mgage an example of what I mean that the gage_test course isn’t cleaned up.  I think so — did it work?
17:17 goehle no
17:18 goehle but that was on a develop server
17:18 goehle not on this patch
17:18 aubreyja I think you just have to recompile mod_perl against apache - a pain sure, but easier than setting up a whole new server
17:18 mgage the pretty_print would not work before this patch
17:19 mgage could be — the perlbrew people didn’t recommend using it for getting different versions of the apache server.
17:19 mgage they mentioned that use case explicitly
17:19 goehle http://pastebin.com/TSA3j3n7
17:19 goehle still didn't work
17:21 goehle nm thats a silly error
17:21 mgage that’s an error in the text
17:21 mgage right
17:21 goehle but there are a lot of them
17:21 mgage kk — I’ll take a quick look — then I got to go
17:21 goehle no worries
17:22 goehle ok got it to work
17:22 goehle the tables look terrible in latex, but whatevs
17:23 goehle anythign I should do to test for pretty_print being used before $PG is defined
17:29 mgage me too — there was another not_null   those can actually be fixed with protect_underbar() if you want a cleaned up version of this problem.
17:29 mgage the tables I get look ok — certianly readable — should print the problem in a single column however.
17:31 mgage I think having a check that $self is defined is enough — you could make that warning more explicit in PGcore — and make warnings about missing displayMode more explicit in PGUtils.  Is PGUtils always being called with display mode defined? — it should be
17:32 mgage but probably not — so that needs to be sorted out.
17:33 mgage I think gage_test could be the basis for a test course that would help those checking pull requests — it’s not as good as automated testing but it beats having to write new test code each time
17:34 goehle yeah
17:34 goehle I"ve been meaning to put a test course suite together
17:34 goehle gate_test seems like a good place to start
17:35 mgage feel free to fork it and update it — once it is in reasonable shape we can rename it and put it up on openwebwork
17:35 goehle It can go on the list :)  Do you want it to be before or after the db stuff?
17:36 mgage no rush — I’d say after — I work on it sporadically whenever I get mired in a pull request
17:36 goehle what is envir in PGcore used for again?
17:37 mgage that’s the complete environment that the pg problems see.  listVariables() prints it out (along with a few other hashes)  I think listEnvVariables() in PGinfo prints out just the environment.
18:16 goehle hey aubreyja
18:16 goehle is there any way we can turn off the strict certificate checking for xml
18:16 aubreyja hey - sup?
18:17 goehle that might have fixed a lot of our issues
18:17 aubreyja actually, I'm just writing to the list about exactly this.
18:17 goehle and if you are visiting the page via html then you have already decided the cert is ok
18:18 goehle an addendum to your list answer
18:18 goehle is that modern browsers will actually go and fetch intermediate certs
18:19 aubreyja k look at my email
18:19 goehle yeah I did
18:19 goehle I think its a good explanation
18:20 mgage joined #webwork
18:21 goehle the main point is browsers have a billion certs then can use to check the chain of trust and the xml pathway doesn't have that
18:21 aubreyja no, I mean the one I just sent. I think it has info about how to disable cert checking
18:21 goehle ah I dont have that one
18:21 mgage i didn’t see it either (just got back)
18:21 aubreyja basically I'm saying  http://search.cpan.org/~mschilli/LWP-Protocol-https-6.06/lib/LWP/Protocol/https.pm
18:21 aubreyja look at that
18:23 goehle so you just have to add the module?
18:23 aubreyja in other words, maybe we can tell the webservice calls to stop requiring a legit cert
18:23 aubreyja they are internal calls, so it shouldn't be a security issue
18:23 goehle are they internal?
18:23 goehle isn't the client browser making the xml request?
18:23 aubreyja eh, well, I think so....
18:24 goehle or is there some handoff there I'm not thinking of
18:24 aubreyja in that case it would use the browser's cert chain
18:24 goehle maybe?  I mean it clearly wasn't because it didn't work
18:24 goehle but it the js on the client side that initiates the call
18:24 mgage also look at http://search.cpan.org/~phred/SOAP-Lite-1.0/lib/SOAP/Transport.pod#SSL_CERTIFICATE_AUTHENTICATION
18:25 mgage and at http://search.cpan.org/~sullr/IO-Socket-SSL-1.997/lib/IO/Socket/SSL.pod  search for verify_none
18:26 aubreyja goehle - what I'm saying is that it clearly wasn't the browser's request that got interrupted
18:26 mgage then you have to figure out where the xml call is being made — I think that for the library browser this is being made through SOAPlite  via the WebworkClient module
18:26 aubreyja yeah, that sounds right. In fact I think the line number is probably in my error logs
18:26 mgage I agree that turning verification off would be a good idea
18:28 aubreyja WebworkClient::xmlrpcCall in 318 of instructorXMLHandler?
18:28 aubreyja or WebworkClient.pm line 164...
18:29 goehle I'm guessing the WebworkClient one, but thats just a guess
18:30 aubreyja yeah in the sub xmlrcpCall in WebworkClient
18:30 aubreyja there's TRANSPORT_METHOD->proxy(...)
18:31 aubreyja which is XMLRPC::Lite
18:31 goehle Did you turn off the SSL certificate checking?
18:31 goehle
18:31 goehle export PERL_LWP_SSL_VERIFY_HOSTNAME=0
18:31 goehle thats about a thread dealing with a similar thing
18:31 goehle so maybe we can just do that
18:31 goehle in WeBWorK Client
18:32 aubreyja maybe - I haven't tried that. Just following the chain (no in SOAP::Lite) to see who needs to be told not to check. (I do think it's LWP)
18:36 aubreyja I think options passed to ->proxy() get sent eventually to LWP::UserAgent
18:36 mgage yes — that’s what I see on  http://search.cpan.org/~phred/SOAP-Lite-1.11/lib/SOAP/Lite.pm
18:37 aubreyja so maybe ssl_opts => { verify_hostname => 0 } inside ->proxy()?
18:38 goehle seems like thats a good option too
18:38 goehle I'm ahving trouble getting a test server running with a self signed cert :P
18:39 mgage aubreyja:  I think that sequence of options should work — it’s worth a try
18:40 aubreyja cool - I'll see if I can test it too
18:41 aubreyja actually, I'll ask arnie to test it
18:59 rbeezer joined #webwork
19:07 goehle ok
19:07 goehle so yoru ssl_opts thing didnt seem to work
19:07 goehle but setting the environment variable died
19:07 goehle did
19:08 aubreyja cool - can you let the email list know?
19:08 goehle should I just create a pull request ?
19:08 aubreyja yeah, that would be great
19:11 goehle I dont get it your thing should work
19:12 aubreyja yeah, who knows.  It could be that it needs to be not checking in more than one place and having it locally in xmlrpcCall() isn't enough
19:13 goehle teh environment variable thing is a little wierd
19:13 goehle I suppose it doesn't do any harm
19:14 aubreyja yeah, probably not. I was going to ask if anyone had security objections to the ssl_opts option (*I* think it's fine). This is probably fine too.
19:14 mgage does setting the environment variable turn off the security checking for other processes?
19:15 aubreyja well, I think that could be why it works and the ssl_opts thing doesn't work.
19:15 goehle yeah
19:15 mgage I don’t see any problem with not checking for our internal xml calls but I wouldn’t know how that affects other processes running on the computer
19:15 goehle it probably turns it off for anything that uses LWP UserAgent
19:15 goehle no, i set it using %ENV in the perl script
19:16 mgage so that might be a concern
19:16 aubreyja the strange thing is that I think all of the XMLRPC::Lite calls go through xmlrpcCall
19:16 mgage in that case it’s better — there would still be no checking for anything going through that instance of apache
19:16 aubreyja right? It's written to be a general wrapper around XMLRPC::Lite calls
19:17 mgage yes
19:18 aubreyja but, apache doesn't use LWP::UserAgent. Those are definitely onlyl used by our perl stuff
19:18 goehle ah ha
19:18 goehle there is also a jsXmlRpc call function
19:18 aubreyja ah ha
19:18 mgage davide used that for library3 — don’t know if jj used it
19:21 goehle no dice
19:21 goehle jj uses xmlRpc_client
19:21 goehle or call or what not
19:23 aubreyja so the environment variable only affects LWP::UserAgent processes. I would think that includes all of the webservice calls, but none of the apache ssl stuff
19:35 aubreyja goehle - did you see Arnie's email - is that what you did that he's saying didn't work?
19:35 aubreyja (btw, I've got to go to class soon)
19:35 goehle np
19:35 goehle I'm testing with a selfsigned cert
19:35 goehle so if we get this working it will also fix that problem
19:56 mgage joined #webwork
21:01 aubreyja goehle any luck?
21:55 goehle I had a meeting and have been away
21:55 goehle none so far
21:55 goehle I'm not sure xmlrpc::lite is passing parameters at all
21:55 goehle so I either have to find a back way to do it
21:56 goehle or use the env variable.
21:56 goehle left #webwork
22:40 mgage joined #webwork
23:44 goehle joined #webwork
23:46 goehle hey mgage
23:46 goehle you said library browser 2 used jsxmlrpc

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