Hacker News new | past | comments | ask | show | jobs | submit login
Edit scheme on your iPad via the parse tree: Lisping launched (slidetocode.com)
111 points by steeleduncan on April 5, 2012 | hide | past | favorite | 45 comments



As I noted last time, this is really, really similar to the Self environment (this demo makes it even clearer). More typing, but cleaner (Morphic isn't exactly sexy, and the Self environment's UI is quite messy and could be significantly improved I think — especially on OSX where you're forced to deal with Morphic itself and with the fugly and shitty X server).

I really think Self on iPad could be a nice beastie, it is way more visual and touchable than even an adapted text editor like Lisping (though not a visual programming environment)


I don't think it has much to do with Self.

It looks more like the structure editors of the 1970s adapted for a tablet. Mid/end 70s several structure editors were written in Lisp, for example DEdit for Interlisp-D.

See chapter 11.3, Using The Lisp Structure Editor http://www.bitsavers.org/pdf/xerox/interlisp/3102300_interlD...

and especially

Chapter 16. List Structure Editor http://www.bitsavers.org/pdf/xerox/interlisp/3101273_Interli...

There were also others which worked over textual terminals.


Wow! I've had this idea in my head for a little while now. Never actually took the time to do it. I'm so thrilled someone did!

If only it was available on Android. Why, oh why did I not go Apple when I had the choice...


Same here. I think everybody who has written Lisp and used a tablet had the same idea.


You still have the choice. You can always sell your Android tablet.


Does anyone who's bought it have a sense of how saving files works? Is it easy to get them off of the iPad, or are they stuck there? There was no mention of that on the app store page.


files go in and out thru email, seems to work well


Thanks. I suppose ssh or dropbox integration would be a little too much to hope for in a proof of concept app. I will have to buy it and leave feedback encouraging development in that direction.


It has one-way (incoming) dropbox support via the dropbox app already.


I'm learning Scheme by myselfy using "The Little Schemer". Do you think something like this would be a good tool for a beginner like me, or would it be confusing?


In the mid-80s there were two kinds of lisp machines.

Xerox's machines came with a parse tree editor similar in concept to this one. You were always working with the specific parse tree. A terribly powerful concept.

The Symbolics machines came with emacs and traditional edit a file, load/compile a file kind of editing.

I believe the Symbolics machines were much more successful in the market, however, both kinds of machines are pretty much dead, but fwiw, the emacs style still survives.

That said, on an iPad I think this system might be quite nice.


Does anyone know about the underlying interpreter or compiler? Do they use a good one or did they write there own (which is then unlikely to be as good as older more developed options)?


Tiny Scheme 1.40


Is there a reason why it's not available in the Republic of Ireland, or is it just that app releases take time to percolate through App Store territories?


No reason I am aware of. If it is still like that tomorrow, please get in touch with me and I'll follow it up.


Looking good now, nice work


Along a similar line, me & dpkendal built a Scheme REPL for iMessage. Just iMessage to scheme@irepl.im (a bit of documentation is in the works).


I tried a standard (+ 5 4) with no reply. :(


Sorry, had a bit of trouble whilst improving it. Back up now.


Got a reply, awesome service. Thank you!


What would be truly awesome would be a built-in API for Webkit so that you could post to an arbitrary URL and parse the response.


I assume there is some way to export or sync the (virtual?) filesystem to another location.

Very cool project, though!


I doubt it, Apple forbids apps from downloading executable code (including your own). If it's anything like Codea[1], you will have to copy/paste your code in and out of the app.

EDIT: Per the manual: "Lisping registers the .scm filetype with iOS so that you can import Scheme source into lisping by emailing a .scm file to your iPad." You can use Dropbox, etc. to get code in/out as well. Given Apple's history, doubt this will survive long.

[1] A Lua IDE and game engine for the iPad http://twolivesleft.com/Codea/


I always feel like a fuddy-duddy telling people that not having access to the filesystem gives me the willies. But this sort of thing reinforces the validity of my reticence.


Is that kind of thing allowed on iOS by now? I thought it wouldn't be.


You can distribute interpreters. However restrictions remain:

1. You cannot distribute an interpreter that can be used for running program code downloaded from the internet. So, for example, your user can save their script and use it themselves but they cannot give it to others (except perhaps through the app store bundled as an app itself).

2. Your interpreter cannot dynamically generate binary code so JIT compilers that generate binary code on-the-fly are not allowed.

edit: For example, LuaJIT cannot do JIT compilation on iOS but it can do JIT compilation for higher performance on Android.


Aren't JIT compilers technically pretty infeasible on iOS anyway because of security restrictions?


Yes. 1st restriction above is more for business reasons, so that there are no ways to circumvent the app store, while 2nd is a technical restriction on 3rd party apps for security purposes. Apple apps (like Safari) can obviously do JIT compilation.

However, I speculate even the 2nd restriction is partly for business reasons because it prevents some third-party toolkits (such as those compiling to LLVM) from achieving high performance. You might remember that Adobe was compiling Flash to LLVM to allow devs to port their Flash apps to iOS, but since LLVM cannot do proper JIT compilation on iOS, it will reduce performance.

FWIW: WinRT imposes both the restrictions above. Android technically doesn't impose either for sideloaded apps. But if you want to distribute app through Google Play, the 1st restriction is indeed imposed.


>Apple apps (like Safari) can obviously do JIT compilation.

I hadn't considered this before, but that means that you could potentially use JS as an intermediate representation for other languages in order to leverage Safari's JIT under iOS. Probably too inefficient to be worthwhile for any language that isn't a dialect of JS, but an intriguing concept nonetheless.


The ability to execute from writable memory is enforced at the process level, and only Safari and a few other Apple apps get that permission.

Javascript in Safari is jitted - but JS in a UIWebView used by a third-party app is not.


Gotta love android, you can cheerfully mprotect away the write-protection on executable pages. I've done some dynamic stub code removal that way. Worst case, you can only hose your own process.


Well that's a relief. Now I don't have to feel bad about not turning that idea into a proof of concept.


I only have two problems with this: It's $7, and it requires iOS 5. Now this might not be a problem for newer iPad owners but I still have no reason to upgrade my first-gen to iOS 5.


Bought it. It is very cool, but please change the default font (or let us change it).


Looks neat, I bought it.

I'm toying with the idea of getting an aws server and run an ssh client there, to get Emacs and bash. With dropbox installed on the server and an external keyboard -- I could maybe skip my heavy portable?!

Anyone has experiences/advice? [edit: E.g. git/svn integration instead of the Dropbox on the server? Or should I use an ssh app for file sync?]


I thought about that a lot before my last laptop upgrade. If I hadn't been buying a new laptop, I would have done it; but with a new laptop at play, I decided a MacBook Air would have roughly the same weight and far better ergonomics than an iPad with a keyboard.


Actually, decoupling the display from the keyboard (iPad with BT KB) could result in a much more ergonomic setup. But in all honesty, the only time I use an iPad for dev is when my air is charging. Even Textastic pales in comparison to a hard keyboard/mouse.


You are probably correct, but... well, what is the fun in that? :-)

I found this http://yieldthought.com/post/12239282034/swapped-my-macbook-...


I got an answer that looks good in another place. When I have some more time, I'll experiment a bit.

http://apple.stackexchange.com/questions/48043/how-to-ssh-fr...


First of all, this is a great idea. I wanted to play around with it but the price tag is way too steep for a toy.


Too steep for a next generation programming app, but not too steep for a coffee and a muffin.


Not even too steep for a toy; a basic Duncan butterfly yo-yo now costs $6.


Toy for some perhaps, also seems like a fantastic way to learn Scheme. Worth the price to learn something that valuable, in my opinion.


[deleted]


I really don't get this at all. People spend $30 on programming books with the hopes of learning something and don't blink an eye about it. $7 for something that removes the "this is impossibly complex" stigma that programming has to non-programmers? Please, I would have loved to have something like this when I was copy/pasting Pascal into a text editor with little idea what it was doing.


I deleted my comment because I didn't think it really added to the discussion that much, but since you've replied I might as well too.

You're right, $7 shouldn't represent any barriers. You'll spend more on the coffee you drink while playing with it. It's easily disposable for anyone who can afford an iPad.

I was just saying that I think it will, and that's a shame.




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

Search: