Hacker News new | past | comments | ask | show | jobs | submit login
Scheme on the iPad (mac.com)
52 points by gnosis on Jan 2, 2011 | hide | past | favorite | 15 comments



I feel that a lispy language on the ipad should not be text-based, but tree-based: you create and manipulate the tree structure using the touch interface.

For example, you touch, and that creates a node.

   o
Then you can type something inside that node. Then you drag lines out of it, and you create child nodes, and so on.

    o-------o
     \
      \
       o
The node doesn't have to be a circle, it could be a long rectangle with atoms inside

   [  ____   ______    ______ ]
You can drag out an atom to turn it into another node

   [  _____   ______    ______ ]
        |
        |
        |
        |
   [ ___  ___ ]



This sounds great! The touch interface is really suitable for drawing tree graphs like these.


Could this be done in a 3D environment, with pinch to zoom in/out to see a view without the details of the AST?


I completely agree. I was thinking about this some days ago, with regards to writing a Lisp-like macro system in a new language, and this idea of graphically manipulating ASTs came to mind.


I seem to remember other programming languages (and programs that run code not included with the application) being banned on the app store. Did something change? Or are you compiling down to JavaScript to get around the limits?


They changed the rules when they published the App Store guidelines PDF.


They dropped those rules. I hope Scratch gets released now because of it.


They dropped the rule against using interpreters, and the rule against having your original code be in other than C, Objective-C, C++, or Javascript.

However, I don't think they dropped the rule against being able to download code. If this thing lets you load files from the net that are interpreted as Scheme programs, it could be in violation of that rule.


Ah, thanks for the clarification - that's too bad.


But you still can install code as packages/files?!

That would be all you need for e.g. Emacs.

Edit: I checked, the rule is a bit unclear but the discussion seemed to be just about downloaded content. Emacs is possible. For a phone, which should be able to handle visa card info etc, I guess this is reasonable.


If you want to use scheme on any platform with JavaScript, check out WeScheme [http://www.wescheme.org]

The server uses the Java AppEngine API. Yes, we did run into issues with requests exceeding the AppEngine timeout. At one point (this may still be true) we were able to compile our compiler on AppEngine. Which brings us to Moby-Scheme, the heart of WeScheme! It's a self-hosting (Scheme -> JavaScript) compiler. [https://github.com/dyoo/moby-scheme]

WeScheme was written in support of BootStrap [http://www.bootstrapworld.org/] an educational initiative aimed at using computer science as a vehicle for teaching algebra to middle-school students.

There is a semi-working structured editor for WeScheme that is a pile of jQuery hooking interactions with content-editable. In retrospect we should have just gone for HTML5. There's also the inkling of a scratch-like interface which is works by swapping in a new style sheet. I'm afraid I can't find the latest version, in my younger days I was a bit sloppy about version control. An older version is available at http://ch4n.org/editor Your mileage may vary.

</shameless plug>


I wast thinking that interface such as Scratch [1] for kids or BYOB[2] for adultus would be so fun on the ipad.

Scratch is an MIT project based on squeak that allows kids to program by dragging blocks in the screen.

And BYOB is an extension to scratch to use functional programming.

[1] http://scratch.mit.edu/ [2] http://byob.berkeley.edu/


MIT submitted Scratch for iPad a while ago and was denied. Hopefully they resubmit now that the rules have loosened.


As a matter of fact they loosened the rules, as direct result of the efforts of John Mcintosh to be able to run Scratch on the Ipad.

However his efforts although were enough to change apple policy, they weren't successful enough to get Scratch to run on the ipad. :-(

Here is a quick summary of the story: http://www.mobilewikiserver.com/Scratch.html http://www.cincomsmalltalk.com/main/2010/12/john-mcintosh-at...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: