<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-2759017781463016019.post6096495771804140916..comments</id><updated>2011-12-09T13:00:30.601-08:00</updated><category term='SiliconValley'/><category term='Python'/><category term='education'/><category term='Emacs'/><category term='SouthAmerica2011'/><category term='Applications'/><category term='Jterm11'/><category term='Travel'/><category term='Cabin'/><category term='Books'/><category term='Mac'/><category term='biking'/><title type='text'>Comments on The Bonelake Perspective: Adding a module to Skulpt</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.bonelakesoftware.com/feeds/6096495771804140916/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2759017781463016019/6096495771804140916/comments/default'/><link rel='alternate' type='text/html' href='http://blog.bonelakesoftware.com/2011/03/adding-module-to-skulpt.html'/><author><name>Brad Miller</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-QrlvO5f-XCY/AAAAAAAAAAI/AAAAAAAAASI/yW7HyVagY70/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2759017781463016019.post-5104514333701288028</id><published>2011-12-09T13:00:30.601-08:00</published><updated>2011-12-09T13:00:30.601-08:00</updated><title type='text'>1)  You are correct.  It took me a long time to fi...</title><content type='html'>1)  You are correct.  It took me a long time to figure out how to get something simple going, it was frustrating and thats what motivated me to publish this post.  I thought I had published something about how to get the turtle module working in a very simple environment, but I may be wrong.  I assume you checked the skulpt mailing list on google?  If not, I&amp;#39;ll rectify that as I&amp;#39;ve got lots of test pages for that that can serve as a model.  &lt;br /&gt;&lt;br /&gt;As I mentioned previously my main motivation in working on and maintaining skulpt was to use in the eBook version of How to Think Like a computer scientist (thinkcspy.appspot.com)  You can see lots of working examples of turtle code in that book by the way.  Now that this semester is coming to an end I&amp;#39;ve got a long list of things that I would like to do that will help make skulpt more accessible for others to use.  Scott has largely moved on to other projects.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve never even tried to figure out the IDE.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ll have to look into the builtinFiles issue.  My initial take is that builtinFiles is the function that overrides read so its read you would want to define.&lt;br /&gt;&lt;br /&gt;Feel free to contact me by email directly and we can continue this conversation more efficiently.&lt;br /&gt;&lt;br /&gt;Brad</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2759017781463016019/6096495771804140916/comments/default/5104514333701288028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2759017781463016019/6096495771804140916/comments/default/5104514333701288028'/><link rel='alternate' type='text/html' href='http://blog.bonelakesoftware.com/2011/03/adding-module-to-skulpt.html?showComment=1323464430601#c5104514333701288028' title=''/><author><name>Brad Miller</name><uri>http://www.blogger.com/profile/02817799963607355195</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-QrlvO5f-XCY/AAAAAAAAAAI/AAAAAAAAASI/yW7HyVagY70/s512-c/photo.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.bonelakesoftware.com/2011/03/adding-module-to-skulpt.html' ref='tag:blogger.com,1999:blog-2759017781463016019.post-6096495771804140916' source='http://www.blogger.com/feeds/2759017781463016019/posts/default/6096495771804140916' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2017219069'/></entry><entry><id>tag:blogger.com,1999:blog-2759017781463016019.post-1856147883583310952</id><published>2011-12-09T12:25:53.147-08:00</published><updated>2011-12-09T12:25:53.147-08:00</updated><title type='text'>Two things...

First, the biggest impediment to Sk...</title><content type='html'>Two things...&lt;br /&gt;&lt;br /&gt;First, the biggest impediment to Skulpt so far was that so many things didn&amp;#39;t work in the distribution (I still can&amp;#39;t get the ide to work, it implies turtle works and it doesn&amp;#39;t but pretends to, import doesn&amp;#39;t work, etc.).&lt;br /&gt;&lt;br /&gt;It really needs, at a minimum, a basic roadmap and more than that a working set of samples to help people get started (it&amp;#39;s always easier to read working code and expand on it than to start from scratch).  I&amp;#39;m used to reading code, so I&amp;#39;m getting through it, but it&amp;#39;s taking me way too much time.&lt;br /&gt;&lt;br /&gt;If I have time, and feel comfortable, I&amp;#39;ll throw some of that together.&lt;br /&gt;&lt;br /&gt;Second, on adding a default read function... I&amp;#39;ve run into a problem that I haven&amp;#39;t yet resolved.  Maybe you know how.&lt;br /&gt;&lt;br /&gt;I tried adding your function to env.js, but then ./m dist failed because Sk.builtinFiles wasn&amp;#39;t defined yet (which I thought Javascript didn&amp;#39;t care about, but obviously the m-compiler in this case does).  I did a search and can&amp;#39;t find anything that ever defines or populates Sk.builtinFiles in the source.  What the...?  Where is it?&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve tried moving it around, and I can fake it out so it compiles by defining Sk.builtinFiles = {}, but it doesn&amp;#39;t actually work... although it doesn&amp;#39;t break your in-page method, either.&lt;br /&gt;&lt;br /&gt;Any ideas?  Is this perhaps why it is defined in-page, because there&amp;#39;s a chicken-egg dependency in there that can&amp;#39;t be defeated?  Even so... where does builtinFiles get populated?  It has to happen somewhere.  If not, is there another way to code read to get what it needs (to find builtinFiles after the fact?).  I&amp;#39;m not much of a JavaScript programmer, so I don&amp;#39;t know all the ins and outs off of the top of my head.&lt;br /&gt;&lt;br /&gt;Any help on getting the ide working is also appreciated.  I have plans to extend (if necessary) the simpler editor.js.  The biggest failing there is a lack of feedback that a program has crashed due to a bug, let alone where it crashed.  But I don&amp;#39;t want to do work I don&amp;#39;t have to do... my goal is to use this for something else, not to work on it for its own sake.&lt;br /&gt;&lt;br /&gt;Thanks for the help, BTW.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2759017781463016019/6096495771804140916/comments/default/1856147883583310952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2759017781463016019/6096495771804140916/comments/default/1856147883583310952'/><link rel='alternate' type='text/html' href='http://blog.bonelakesoftware.com/2011/03/adding-module-to-skulpt.html?showComment=1323462353147#c1856147883583310952' title=''/><author><name>sphaerica</name><uri>http://sphaerica.wordpress.com/</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/openid16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.bonelakesoftware.com/2011/03/adding-module-to-skulpt.html' ref='tag:blogger.com,1999:blog-2759017781463016019.post-6096495771804140916' source='http://www.blogger.com/feeds/2759017781463016019/posts/default/6096495771804140916' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-55676580'/></entry><entry><id>tag:blogger.com,1999:blog-2759017781463016019.post-8274107286356010955</id><published>2011-12-09T11:17:45.413-08:00</published><updated>2011-12-09T11:17:45.413-08:00</updated><title type='text'>Ah,  I get what you are talking about now.  If you...</title><content type='html'>Ah,  I get what you are talking about now.  If you do make that change I&amp;#39;d be happy to take a patch :-)&lt;br /&gt;&lt;br /&gt;Regarding Sk.configure, no there are only a handful of functions that you can change through Sk.configure, read, write, and debug IO come to mind.  I haven&amp;#39;t looked at that code recently so its possible there are a couple more out there.&lt;br /&gt;&lt;br /&gt;I agree with you about import.  It may be that the change you talk about would be a huge step in the right direction.  This may be one explanation of why we don&amp;#39;t see more skulpt usage in the wild.  I&amp;#39;ve been more focused on getting skulpt to work for my own purposes (thinkcspy.appspot.com)  rather than thinking about improving skulpt generally.  Its great to have these conversations, and hopefully some more community involvement around skulpt will start to generate more of this thinking.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2759017781463016019/6096495771804140916/comments/default/8274107286356010955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2759017781463016019/6096495771804140916/comments/default/8274107286356010955'/><link rel='alternate' type='text/html' href='http://blog.bonelakesoftware.com/2011/03/adding-module-to-skulpt.html?showComment=1323458265413#c8274107286356010955' title=''/><author><name>Brad Miller</name><uri>http://www.blogger.com/profile/02817799963607355195</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-QrlvO5f-XCY/AAAAAAAAAAI/AAAAAAAAASI/yW7HyVagY70/s512-c/photo.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.bonelakesoftware.com/2011/03/adding-module-to-skulpt.html' ref='tag:blogger.com,1999:blog-2759017781463016019.post-6096495771804140916' source='http://www.blogger.com/feeds/2759017781463016019/posts/default/6096495771804140916' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2017219069'/></entry><entry><id>tag:blogger.com,1999:blog-2759017781463016019.post-949844230834204752</id><published>2011-12-09T09:13:08.835-08:00</published><updated>2011-12-09T09:13:08.835-08:00</updated><title type='text'>What I meant was, what if I put my own code proper...</title><content type='html'>What I meant was, what if I put my own code properly into a module in src/lib (as you described), but put this implementation of builtinRead into builtin.js/builtindict.js so that my own page would be less cluttered with nuts and bolts (i.e. more in skuplt, less in the page, so that in effect Scott&amp;#39;s original index.html would properly use imports)?&lt;br /&gt;&lt;br /&gt;I mean, yes, in the long run it&amp;#39;s 6 of one... but to me, it&amp;#39;s cleaner.&lt;br /&gt;&lt;br /&gt;So I&amp;#39;m just checking to make sure that there isn&amp;#39;t some other reason for doing builtinRead as you did it, in page, instead of just pre-loading it into builtin.js.&lt;br /&gt;&lt;br /&gt;Along those same lines... will a call to Sk.configure() replace any corresponding compiled builtin of the same name?  That is, if your version of read were added to builtin.js, would that preclude or still allow for an environment-specific read function as planned (in effect giving a default behavior that does the most obvious thing, but still providing flexibility)?  Certainly, I could see also wanting a version that uses a URI to grab the import from a separate file on the server instead of compiled into skulpt (not sure that this would work... it&amp;#39;s just a rough idea).&lt;br /&gt;&lt;br /&gt;I&amp;#39;m just surprised that all of the import behavior exists but it doesn&amp;#39;t work &amp;quot;out of the box.&amp;quot;&lt;br /&gt;&lt;br /&gt;[Actually, a quick digression... I just dug into import.js and env.js and see that read is implemented in env.js as { throw &amp;quot;Sk.read has not been implemented&amp;quot;; }, which suggests to me that I could in fact put your implementation there, as a default behavior, but still override it with another behavior in a page if I so desired -- because that&amp;#39;s basically what you are doing, overriding the defined &amp;quot;not yet implemented&amp;quot; method.  In fact, I could put it there and make it a &amp;quot;controllable&amp;quot; version with a simple JavaScript &amp;quot;Sk.readmode&amp;quot; variable that could in turn be set in the page or perhaps within a program to toggle the read behavior.  Thus it would do to the two most obvious things -- import from src/lib or import from a server-side .py file -- and yet still be able to be changed to do something crazy should that be needed.]</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2759017781463016019/6096495771804140916/comments/default/949844230834204752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2759017781463016019/6096495771804140916/comments/default/949844230834204752'/><link rel='alternate' type='text/html' href='http://blog.bonelakesoftware.com/2011/03/adding-module-to-skulpt.html?showComment=1323450788835#c949844230834204752' title=''/><author><name>sphaerica</name><uri>http://sphaerica.wordpress.com/</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/openid16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.bonelakesoftware.com/2011/03/adding-module-to-skulpt.html' ref='tag:blogger.com,1999:blog-2759017781463016019.post-6096495771804140916' source='http://www.blogger.com/feeds/2759017781463016019/posts/default/6096495771804140916' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-55676580'/></entry><entry><id>tag:blogger.com,1999:blog-2759017781463016019.post-5379691480838491150</id><published>2011-12-09T08:45:24.626-08:00</published><updated>2011-12-09T08:45:24.626-08:00</updated><title type='text'>A couple of things.  builtinRead is meant to be an...</title><content type='html'>A couple of things.  builtinRead is meant to be an application specific function.  Scott designed skulpt so that you had control over how IO works depending on the environment you are running in.  In theory the read function could be overwritten to provide for simulated file input in some other way, like using XMLHTTPRequest or getting text from a &amp;lt;pre&amp;gt; tag, etc.&lt;br /&gt;&lt;br /&gt;If you put your code into builtin.js/builtindict.js then it becomes part of the builtin namespace.  Thats not how modules work, you would not need to import anything, your functions would just be there.  The goal here is to make skulpt behave like regular CPython.  Make sense?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2759017781463016019/6096495771804140916/comments/default/5379691480838491150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2759017781463016019/6096495771804140916/comments/default/5379691480838491150'/><link rel='alternate' type='text/html' href='http://blog.bonelakesoftware.com/2011/03/adding-module-to-skulpt.html?showComment=1323449124626#c5379691480838491150' title=''/><author><name>Brad Miller</name><uri>http://www.blogger.com/profile/02817799963607355195</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-QrlvO5f-XCY/AAAAAAAAAAI/AAAAAAAAASI/yW7HyVagY70/s512-c/photo.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.bonelakesoftware.com/2011/03/adding-module-to-skulpt.html' ref='tag:blogger.com,1999:blog-2759017781463016019.post-6096495771804140916' source='http://www.blogger.com/feeds/2759017781463016019/posts/default/6096495771804140916' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2017219069'/></entry><entry><id>tag:blogger.com,1999:blog-2759017781463016019.post-4385108410571990083</id><published>2011-12-09T07:29:06.756-08:00</published><updated>2011-12-09T07:29:06.756-08:00</updated><title type='text'>Okay, I&amp;#39;ve only been at this a day, so bear wi...</title><content type='html'>Okay, I&amp;#39;ve only been at this a day, so bear with me.  I&amp;#39;m getting along okay now, but... why isn&amp;#39;t builtinRead simply included in builtin.js?  Why do we have to jump through hoops just to make imports (that are already compiled as part of Skulpt) work?&lt;br /&gt;&lt;br /&gt;Is there any reason I can&amp;#39;t just move your code into src/builtin.js and src/buildindict.js, compile, and use the improved distribution?  Did you do things this way only because it&amp;#39;s not already part of Scott&amp;#39;s code version?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2759017781463016019/6096495771804140916/comments/default/4385108410571990083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2759017781463016019/6096495771804140916/comments/default/4385108410571990083'/><link rel='alternate' type='text/html' href='http://blog.bonelakesoftware.com/2011/03/adding-module-to-skulpt.html?showComment=1323444546756#c4385108410571990083' title=''/><author><name>sphaerica</name><uri>http://sphaerica.wordpress.com/</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/openid16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.bonelakesoftware.com/2011/03/adding-module-to-skulpt.html' ref='tag:blogger.com,1999:blog-2759017781463016019.post-6096495771804140916' source='http://www.blogger.com/feeds/2759017781463016019/posts/default/6096495771804140916' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-55676580'/></entry><entry><id>tag:blogger.com,1999:blog-2759017781463016019.post-9048164485537743334</id><published>2011-06-16T05:31:26.532-07:00</published><updated>2011-06-16T05:31:26.532-07:00</updated><title type='text'>Modules can be written in Python.  You don&amp;#39;t h...</title><content type='html'>Modules can be written in Python.  You don&amp;#39;t have to do anything special in the Python code either.  Just go ahead and define a class or some functions and they will be available.&lt;br /&gt;&lt;br /&gt;The docbi command of m will find them under src/lib and compile a module written in Python into javascript and make it available to import as part of the builtin.js file.&lt;br /&gt;&lt;br /&gt;Brad</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2759017781463016019/6096495771804140916/comments/default/9048164485537743334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2759017781463016019/6096495771804140916/comments/default/9048164485537743334'/><link rel='alternate' type='text/html' href='http://blog.bonelakesoftware.com/2011/03/adding-module-to-skulpt.html?showComment=1308227486532#c9048164485537743334' title=''/><author><name>Brad Miller</name><uri>http://www.blogger.com/profile/02817799963607355195</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.bonelakesoftware.com/2011/03/adding-module-to-skulpt.html' ref='tag:blogger.com,1999:blog-2759017781463016019.post-6096495771804140916' source='http://www.blogger.com/feeds/2759017781463016019/posts/default/6096495771804140916' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2017219069'/></entry><entry><id>tag:blogger.com,1999:blog-2759017781463016019.post-916464250418516631</id><published>2011-06-15T17:11:20.138-07:00</published><updated>2011-06-15T17:11:20.138-07:00</updated><title type='text'>Thanks for your posts on Skulpt, they were *really...</title><content type='html'>Thanks for your posts on Skulpt, they were *really* useful.&lt;br /&gt;&lt;br /&gt;I discovered Skulpt few days ago and I wasn&amp;#39;t able yet to guess how to create a new module or even import the existing ones.&lt;br /&gt;&lt;br /&gt;Do you know if it&amp;#39;s possible to import a .py module or modules have to be written with Javascript ?&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Pascal</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2759017781463016019/6096495771804140916/comments/default/916464250418516631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2759017781463016019/6096495771804140916/comments/default/916464250418516631'/><link rel='alternate' type='text/html' href='http://blog.bonelakesoftware.com/2011/03/adding-module-to-skulpt.html?showComment=1308183080138#c916464250418516631' title=''/><author><name>Squale</name><uri>http://www.hypee.com</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.bonelakesoftware.com/2011/03/adding-module-to-skulpt.html' ref='tag:blogger.com,1999:blog-2759017781463016019.post-6096495771804140916' source='http://www.blogger.com/feeds/2759017781463016019/posts/default/6096495771804140916' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1202026999'/></entry></feed>
