Re: What to do in v. 6 in place of Miscellaneous`RealOnly
- To: mathgroup at smc.vnet.net
- Subject: [mg77088] Re: What to do in v. 6 in place of Miscellaneous`RealOnly
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Sun, 3 Jun 2007 06:09:35 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <f33ork$l7l$1@smc.vnet.net> <f36go3$9rf$1@smc.vnet.net> <200705260842.EAA18740@smc.vnet.net> <200705270852.EAA03263@smc.vnet.net> <6063CBD7-7FB9-4719-90F7-DE917481A78E@earthlink.net> <f3gpr5$3m5$1@smc.vnet.net>
Murray Eisenberg wrote: > Will such an Import handle correctly contexts from an "ordinary" package? Yes. See at the bottom of the message for the location of a test package and some Mathematica version 6.0 commands. > (The web server I use for most things is out of service at the moment, > so I cannot test that.) > > > Selwyn Hollis wrote: >> Apparently, it's now possible to load a package from a remote location >> on the web. >> >> I put a simple init.m file that defines a function HexToDecimal at this >> url: >> >> http://www.math.armstrong.edu/faculty/hollis/init.m >> >> Entering this quietly loads it: >> >> Import["http://www.math.armstrong.edu/faculty/hollis/init.m"] >> >> For verification, enter this: >> >> ?HexToDecimal >> >> Stunning. >> >> >> - Selwyn >> >> >> On May 27, 2007, at 4:52 AM, Murray Eisenberg wrote: >> >>> You've stumbled upon a long-standing problem I've faced with using >>> Mathematica in an academic setting (or perhaps any setting) where >>> systems are locked down by the folks whom maintain the systems: how to >>> handle 3rd-party add-on packages. >>> >>> In my own experience, getting the packages installed on the students' >>> own machines is not that big a deal provided the zip file (or whatever) >>> is properly assembled and the instructions are sufficiently clear and >>> the students are able to follow direction. (Hmm...the last IS a bit of >>> a problem: if only students read directions as carefully as I wrote >>> them!) >>> >>> The real problem resides with lab & classroom computers. Given >>> sufficient advance notice, of course, such packages can be incorporated >>> into the standard software on the systems. (At my own institution, any >>> package needed for the September semester needs to be in the hands of >>> the IT folks no later than July 1, and preferably earlier; for the >>> Spring semester, no later than Thanksgiving. This is a real pain.) >>> >>> I don't have a good solution to this. Perhaps somebody at Wolfram >>> Research will look into it. >>> >>> Helen Read wrote: >>>> dimitris wrote: >>>>> Hi Helen. >>>>> >>>>> I don't have version 6 but in case you don't know >>>>> there is a much more flexible package named >>>>> SwitchableRealOnly by Ted Ersek available at >>>>> >>>>> http://library.wolfram.com/infocenter/MathSource/560/ >>>> I'll have a look at that, but I'm not keen on using a package that the >>>> students would have to download and install themselves. (They use >>>> Mathematica on their own laptops and in computer labs all over campus, >>>> not just the classrooms maintained by the math department.) >>> -- >>> Murray Eisenberg murray at math.umass.edu >>> Mathematics & Statistics Dept. >>> Lederle Graduate Research Tower phone 413 549-1020 (H) >>> University of Massachusetts 413 545-2859 (W) >>> 710 North Pleasant Street fax 413 545-1801 >>> Amherst, MA 01003-9305 >>> > I have put a test notebook at http://homepages.nyu.edu/~jmg336/mathematica/Sierpinski.m As you can see below, the context JMGTests`Sierpinski` is correctly created. Very cool feature indeed. In[1]:= $ContextPath Import["http://homepages.nyu.edu/~jmg336/mathematica/Sierpinski.m"] $ContextPath ?JMGTests`Sierpinski`* drawCarpet[4] Out[1]= {"PacletManager`", "WebServices`", "System`", "Global`"} Out[3]= {"JMGTests`Sierpinski`", "Utilities`URLTools`", "JLink`", \ "PacletManager`", "WebServices`", "System`", "Global`"} drawCarpet[n] draws the Sierpinski's Carpet [graphic deleted] Regards, Jean-Marc P.S. Here is the code of the package. (Not breathtaking, for sure, but it works well for illustrative purpose.) (* ::Package:: *) BeginPackage["JMGTests`Sierpinski`"] drawCarpet::usage="drawCarpet[n] draws the Sierpinski's Carpet" Begin["Private`"] rules = {0 -> {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}, 1 -> {{1, 1, 1}, {1, 0, 1}, {1, 1, 1}}}; f[m_:1] := ArrayFlatten[m /. rules] drawCarpet[n_Integer?Positive] := MatrixPlot[Nest[f, 1, n], FrameTicks -> None] End[] EndPackage[]