HNHacker News
TopNewBestAskShowJobs

w01fe

374 karma · joined December 15, 2010

submissionscomments
w01fe··on Graph: Abstractions for Structured Computation
Protocols and multimethods are great tools to manage polymorphism, whereas Graph is about composition. We use both extensively in our codebase, and treat them as separate tools in our toolbox for building fine-grained, composable abstractions.

For example, I don't think protocols or multimethods could easily do any of the things mentioned in the second half of the post (execute part of a computation, auto-parallelize it, monitor the components, etc).

That said, there is actually one case where we use Graphs to solve a difficult polymorphism problem, which I discussed a bit in my Strange Loop talk. Our core newsfeed generation logic used to be composed of protocols/multimethods (we tried both), since each feed type (we have about 10) can define different variants of various steps in the pipeline (but most of the steps are the same). This worked fairly well, but as our system grew more and more complex, we found that there was still a lot of overhead, since the protocol had to contain all the steps that could change, leading to lots of extra complexity.

We've replaced all of this with Graph, where we just define an 'abstract' graph with the most common steps, and each feed type modifies the graph by changing or adding steps -- and we've found this way to be much simpler and easy to understand than what we had before.

This case is special, since it involves both a complex composition and polymorphism. Everywhere else in our codebase, we use (and love) protocols and multimethods for polymorphism.

w01fe··on Graph: Abstractions for Structured Computation
No, this isn't just about Clojure. You could do similar things in Scheme, or CL, or even Python or Ruby.

What's cool about this isn't that we've managed to put functions in a data structure. It's that doing this in a particular way allows us to describe computations in a declarative way. This declarative specification opens up lots of interesting avenues to do new things with our code that weren't available before.

Of course the idea of declarative programming isn't new either, but we think this particular instantiation is cool because it's extremely simple and close to the language. Writing a Graph doesn't feel any heavier than writing the corresponding non-declarative code, and this is crucial for making it actually useful in many kinds of situations (rather than just cases where heavy lifting is necessary, like distributed stream processing for example).

w01fe··on Graph: Abstractions for Structured Computation
I'm not sure I follow, can you elaborate? I think something similar could be done in CL, although some of the design decisions might be different because Clojure has nice map literals and function metadata.
w01fe··on Graph: Abstractions for Structured Computation
I'm one of the authors of Graph, and I'll be here to answer questions and read comments. Please let us know what you think, and help us make plumbing and Graph better. Thanks!
w01fe··on Prismatic gets $15 million in Series A Funding
Thanks for the kind words and feedback. The best way to let us know is to email feedback@getprismatic.com with details (iPhone/Web, Browser, any other details), and we'll do our best to fix it ASAP.
w01fe··on Prismatic's "Graph" at Strange Loop
Awesome, I'm excited to see what you come up with. If you do end up making something, please email me a link (I wrote you earlier) since I'm sure there's lots to be improved in our implementation.
w01fe··on Prismatic's "Graph" at Strange Loop
Flop is definitely on the list (with about 10 other libraries), but I'm not sure about our optimization code. We plan to start a discussion of what we should prioritize soon, so stay tuned.
w01fe··on Prismatic's "Graph" at Strange Loop
That's awesome -- thanks for posting
w01fe··on Prismatic's "Graph" at Strange Loop
Thanks! Nope, no common lisp port -- and we haven't released the Clojure yet, but plan to soon. It's only 150 lines of code or so should be easy to port or rewrite from scratch.
w01fe··on Prismatic's "Graph" at Strange Loop
We haven't had the need for that application yet, but it's certainly possible -- that's why declarative specifications are great :)

I haven't heard of SecDB, but I'll definitely check it out -- thanks!

w01fe··on Prismatic's "Graph" at Strange Loop
Yep, that's correct.

Point taken about the names, thanks for the feedback. Since Clojure already uses defn and fn, defnk and fnk seemed natural. But maybe defn-keyword and fn-keyword would be better.

w01fe··on Prismatic's "Graph" at Strange Loop
Thanks! There are some more complex examples in the slides, I just didn't want to make the blog post any longer.

The main similarity between this and Nathan Marz's Storm framework is that they both rely on a declarative expression of the structure of the computation graph.

However, beyond that there are many key differences. Storm is a graph computation framework, which compiles your specification into a distributed real-time computation pipeline. In contrast, Graph is just a library for expressing composition structure, but says nothing about execution strategy.

In principle (with a lot more code and some more annotations), one could compile Graphs into distributed real-time topologies like Storm. For now we've been using Graph in-process for real-time processing. But because Graph is so simple and close to the language, it's very easy to apply to new situations and build new abstractions on top of. For example, we also find Graph useful for expressing the composition structure of our production services, which are built up from many components.

w01fe··on Prismatic's "Graph" at Strange Loop
Sure! This particular way of expressing declarative structure may be specific to Clojure, but the basic ideas should be useful in any (especially dynamic) language with first-class functions.

The first idea is to take a complex system and express the set of components and their relationships declaratively, rather than procedurally. This is an old idea, and makes it possible to reason about the system, mock out components for testing, map over the components for monitoring, and more.

The second idea is simplicity. By making this declarative language as simple as possible, it becomes trivially easy to do all the things I just mentioned using the existing tools in the language, without needing to write complex library functions to support each use case.

For another example of a declarative system for composition you could look at 'react' in JS, which can be used in similar ways to Graph (and also supports things like async composition): https://github.com/jeffbski/react

w01fe··on Prismatic for iPhone is now live in the App Store
What platform are you browsing from? There should be a login link at the top right of the landing page.
w01fe··on Prismatic for iPhone is now live in the App Store
you already have a username, you just may not know it (if you signed up long ago it was automatically set to your twitter handle). Email feedback@getprismatic.com with account details and we'll help you out.
w01fe··on Prismatic for iPhone is now live in the App Store
Thanks for the feedback. On the web you can see those settings in your profile, but unfortunately profile didn't make it into this first version. For now you can configure this stuff on the web, but we plan to fix this omission in the next version -- thanks for bearing with us.
w01fe··on Prismatic for iPhone is now live in the App Store
Thanks!

Hardest and most rewarding was all the serious engineering we did to make the app and gestures fun and fast. Most of the components in the app are custom, from the navigation controller to the story menu down to the scroll physics. Aria just answered this Quora question that goes into some of the details.

http://www.quora.com/Prismatic/What-were-the-techniques-Pris...

If you have any particular things you'd like us to elaborate on, we'd be happy to answer your questions.

w01fe··on Prismatic for iPhone is now live in the App Store
Sure, you can create a "stealth" account that's not attached to any social networks. You'll miss out on our automatic interest suggestions and the ability to share out to your friends, but you can always attach those accounts later.

If you create a stealth account you'll get a canned set of suggestions, but you can still use search through our hundreds of thousands of topics and publishers to tell us what you're interested in.

w01fe··on Prismatic for iPhone is now live in the App Store
Thanks! Offline didn't quite make it into the first version, but it's coming soon.
w01fe··on Prismatic for iPhone is now live in the App Store
These users were mostly random people in coffee shops, on the street, etc. I'm sure there's still a bias when someone is looking over their shoulder, but we could get a pretty good idea of whether average users 'get it' right away or floundered. We went through about 5 full redesigns of the walkthrough based on this testing before we arrived at the current version. Of course, we'll keep experimenting and improving in future versions.
w01fe··on Prismatic for iPhone is now live in the App Store
Thanks for the thoughtful feedback! We've put a lot of work into the gestures, and during user testing most users seemed to find them intuitive. But if you have suggestions or other ideas about them we'd love to hear them.

For pull to refresh specifically, you're right that it's not really necessary -- the best way to use Prismatic is to just keep reading and scrolling down. But it's something that many users seem to look for (both on the web and on mobile), and so we decided to put it in to support this style of browsing for people who want it.

w01fe··on Prismatic for iPhone is now live in the App Store
Thanks for the feedback. We're revamping this part in the next version -- for now you can add Facebook or Twitter directly from the share box, or sign in on the web to associate your Google account and get suggestions from Reader.
w01fe··on Prismatic's Global Newsfeed
Post tweets: so you can share from the app. Update profile: We don't do it, but Twitter only has 3 discrete permission levels (read, read/write, read/write/DM).

We never write to your Twitter account unless you explicitly ask us to.

w01fe··on Prismatic's Global Newsfeed
Oops -- think I broke it when I changed the survey link text. Think it's fixed now, thanks for posting.
w01fe··on Prismatic's Global Newsfeed
Good point, thanks. I edited the post, and here's a direct link to the survey for anyone who missed it:

https://docs.google.com/spreadsheet/viewform?formkey=dGRzR2d...

w01fe··on Prismatic goes public
Here are a few feeds that HN readers may be interested in:

http://getprismatic.com/news/topic/Startups

http://getprismatic.com/news/topic/Silicon%20Valley

http://getprismatic.com/news/topic/Entrepreneurship

http://getprismatic.com/news/topic/Programming

http://getprismatic.com/news/topic/San%20Francisco

w01fe··on Prismatic Hopes to Create a New Category of Social News
We only use that permission to allow you to share stories you find with Prismatic. We'll never tweet unless you ask us to.
w01fe··on Prismatic Hopes to Create a New Category of Social News
The first 10 people to email hackernews@getprismatic.com with their twitter handle will get an immediate invite to our early access.

Edit: gone -- but if you sign up at getprismatic.com you should get an invite soon.

w01fe··on Mountain Lion: John Gruber's personal briefing
FTA: "It’s a system whereby developers can sign up for free-of-charge Apple developer IDs which they can then use to cryptographically sign their applications."
w01fe··on Eric Schmidt: If you can’t use your real name, don’t use Google+
It's probably a reference to this famous comic:

http://bit.ly/jb485V (Wikipedia, shortened because HN breaks the real URL by stripping out the apostrophe).

← PreviousPage 3 of 4Next →