Show HN: A stack-based pure functional language for touch devices
github.com
github.com
Excuse me if this is implemented and just not in the README:
It would be super awesome if there was a type inference engine that fed into the UI to increase productivity.
For example, if I start to define a function that returns an int, when I go to write out the definition, it suggests functions to me that return ints.
Suppose I pick a function "string_length" which takes strings and returns ints. Now I continue the composition, so it suggests functions (either built-ins or user-defined) which return strings.
Suppose I pick "bool_to_string" which takes a bool and returns strings. Then to finish off the function I pick from a list of bool-returning functions, say I pick "xor".
So now with a few keypresses I have defined a function that, in C, would look like:
int foo(bool x, bool y) {
return string_length(bool_to_string(x ^ y));
}I've got a few blog posts about it here: http://gliese1337.blogspot.com/2014/03/parles-language-with-...
I’m more than willing to lead the effort if there’s enough interest—but as it is, it seems like those most interested in seeing it happen are those least interested in actually helping. So I just keep working on Kitten.
Factor is an impressive piece of engineering, and for those who like dynamic typing, I’d strongly encourage people to use it, and see how useful a dynamic and reflective programming environment can be. It’s just not the language I want to build.
It's purely functional and stack-based. This is a clever approach to the UI problem - how to program when you can't typeLongWords? Answer: use the stack! I expect the act of writing programs will feel a lot like using an old programmable calculator.
Really excited to see how this progresses!
PS: How do I run that demo locally?
I'll add official build info tonight, but it's a cordova app, so: (also be aware most things are buggy or simply not implemented right now)
# make sure you have npm, gulp, & cordova
$ cd client
$ npm install
$ gulp app
$ cd ../mobile
$ cordova platform add android (or ios!)
$ cordova run android (or ios!)
2. I would flip out even more if this UI was available for more mainstream functional languages like Haskell or Clojure. Do libraries break the process? I don't think they have to.
I wrote an article for InfoVis.net about "Why pie menus aren't ubiquitous?" [1] in 2003, but since they still aren't ubiquitous, it's good to keep asking that question.
[1] http://www.infovis.net/printMag.php?num=125&lang=2
They may not be everywhere, but they've turned up many places, including games like The Sims, and tools like the Grasshopper visual programming language for Rhino 3d.
Some NeXT Step applications may have implemented pie menus, but I tried unsuccessfully to convince Steve Jobs to make them an official part of the NeXT Step GUI.
On October 25 1988, I gave Steve Jobs a demo of pie menus, NeWS, UniPress Emacs and HyperTIES at the Educom conference in Washington DC. His reaction was to jump up and down, point at the screen, and yell “That sucks! That sucks! Wow, that’s neat! That sucks!”
I tried explaining how we'd performed an experiment proving pie menus were faster than linear menus, but he insisted the liner menus in NeXT Step were the best possible menus ever.
But who was I to rain on his parade, two weeks after the first release of NeXT Step 0.8? (Up to that time, it was the most hyped piece of vaporware ever, and doubters were wearing t-shirts saying "NeVR Step"!)
In the mean time I've been developing pie menus for many different applications and platforms:
Here's an implementation of pie menus I wrote for jQuery: https://github.com/SimHacker/jquery-pie
And some documentations and thoughts on the design: http://www.donhopkins.com/mediawiki/index.php/JQuery_Pie_Men...
The Sims, Pie Menus, Edith Editing, and Simantics Visual Programming Demo.
https://www.youtube.com/watch?v=-exdu4ETscs
This is a demonstration of the pie menus, architectural editing tools, and Edith visual programming tools that I developed for The Sims with Will Wright at Maxis and Electronic Arts.
Unity3D Pie Menu Demo.
https://www.youtube.com/watch?v=sMN1LQ7qx9g
I've made a general purpose pie menu component in C# for Unity3D, which supports text items, image items, and 3d object items too!
I will make it available as free open source software on the Unity3D app store!
Here's a silly demo, showing a set of SimCity pie menus: http://www.donhopkins.com/home/PieMenuDemo/PieMenuDemo.html (If you don't have the Unity3D browser plug-in installed, it should show you a link to install it.)
They have a full set of useful notifiers so you can tightly integrate them with your application to give rich feedback during tracking (for example, modifying the 3D menu items, or previewing the effect of the menu item and distance parameter in real time, making them more like "direct manipulation").
For example, to show how you can implement feedback like The Sims pie menus with the head in the center that looks at the selected item, I've made a 3d object in the pie menu center with the webcam texture on it, so YOUR head is in the center of the menu, looking at the selected item! (That's why the demo asks for permission to use the webcam.)
The pie menu and each item has a title as well as a description. One feature I've added is the ability not only to disable an item, but also to provide an explanation of why the item is disabled! (PacMan in the demo is disabled, for example.) I wish other menus and widgets would do that -- it's frustrating when you can find an item you want, but can't figure out why it's disabled!
Another nice thing about them is that you can either configure algorithmically with an API, or with JSON data (which makes it easy to make dynamic data driven menus downloaded from a server or database), or construct them in the Unity3D editor out of objects (which makes it easier for artists to design them)!
I've made a custom Unity3D editor that lets you edit the properties, drag and drop textures and objects, edit and rearrange the items, and has some convenience commands, so you can place the 3D item objects in a circle in the 3D world, and call a command that figures out which item is in which direction by their position, and tidies them up. (That is much easier than arranging their order in a linear list of items.)
I'm going to play around with more in-world editing features, to make them easier for artists to design them.
Source code: http://www.donhopkins.com/home/PieMenuDemo/PieMenuDemo.zip
MediaGraph Music Navigation with Pie Menus Prototype developed for Will Wright's Stupid Fun Club: https://www.youtube.com/watch?v=2KfeHNIXYUc
This is a demo of a user interface research prototype that I developed for Will Wright at the Stupid Fun Club. It includes pie menus, an editable map of music interconnected with roads, and cellular automata.
It uses one kind of nested hierarchical pie menu to build and edit another kind of geographic networked pie menu.
Stack based languages resonate with me as a Forth and PostScript programmer!
Please check out this pie menu based visual PostScript debugger for NeWS, called the PSIBER Space Deck, which I hope inspires you, and I'll be glad to answer questions about: http://www.donhopkins.com/drupal/node/97 Source: http://donhopkins.com/home/code/litecyber.ps.txt
One nice thing about PostScript is that it's homoiconic: PostScript code is just PostScript data. So that lets you use a data structure editor as a code editor.
It had a generic set of pie menus that applied to all objects for editing the view and doing standard copy/paste/edit/eval operations, but there was also one object-type-specific submenu to the north-east. So there was a common set of gestures across all objects, that you could learn to use easily.
I am somewhat in love with homoiconicity; perhaps no other revelation in CS mattered more to me than that discovery when learning scheme. Here's the one sticking point that I couldn't figure out: how to live without closures. Building up a quoted hunk of code and injecting the right values in the right places just seems so much less clear. Thoughts?
Maybe it's just a matter of having the right helper functions, like something that does printf-style substitution for quoted programs?
And I'll need another hour to go through all those other links above, but I'm excited about it! More later.