Live data from Hacker News

Prismatic's "Graph" at Strange Loop

blog.getprismatic.com

21–30 of 47 posts

Re: Prismatic's "Graph" at Strange Loop

#21

Just a heads up, it looks like something is up with your CSS: http://cl.ly/image/241X1C2D3O35 I'm on 10.8 with the latest version of safari. In other news, this looks pretty cool.

I had this same problem on my Android phones Chrome browser and went to my laptop for reading.

Re: Prismatic's "Graph" at Strange Loop

#22
post #14
post #12

If I understand the nature of this system, it's essentially a higher-order function composition tool. Correct? Nit, defnk? what about def-kw-func or something? not wholly readable as defnk.

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.

I really like this idea. Do you have a Common Lisp port of this, out of curiosity? If not I might have to see what I can come up with. :-)

I like to have fully expanded names, ala Common Lisp. My editor will autocomplete those on demand after I use a name once, so it's not a hindrance to reading or writing.

My goal for identifiers is that I can read without consulting my internal lookup table.

Re: Prismatic's "Graph" at Strange Loop

#23
post #8
post #4

This sounds very useful. I'm having trouble understanding the nature of the system, though, because I don't really understand lisp / clojure. Is this a pattern that could be applied in any language with first class functions, or does it require a lisp to be practical?

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 compon…

Thanks! That makes a lot of sense, and react looks like a really interesting project. I'll have to go back and reread the article with an eye for applying its ideas in Javascript / Coffeescript.

Re: Prismatic's "Graph" at Strange Loop

#25
post #22
post #14

Earlier quoted context omitted.

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.

I really like this idea. Do you have a Common Lisp port of this, out of curiosity? If not I might have to see what I can come up with. :-) I like to have fully expanded names, ala Common Lisp. My editor will autocomplete those on demand after I use a name once, so it's not a hindrance to reading or writing. My goal for identifiers is that I can read without consulting my internal lookup table.

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.

Re: Prismatic's "Graph" at Strange Loop

#26
post #4

This sounds very useful. I'm having trouble understanding the nature of the system, though, because I don't really understand lisp / clojure. Is this a pattern that could be applied in any language with first class functions, or does it require a lisp to be practical?

You can do it in any language with first class functions and reflection.

Here's a stupid simple js implementation of their example:

https://gist.github.com/3874826

Edit: Loaded the page and got interrupted by lunch. Shows me for not refreshing.

Re: Prismatic's "Graph" at Strange Loop

#27
post #4

This sounds very useful. I'm having trouble understanding the nature of the system, though, because I don't really understand lisp / clojure. Is this a pattern that could be applied in any language with first class functions, or does it require a lisp to be practical?

You can do it in any language with first class functions and reflection. Here's a stupid simple js implementation of their example: https://gist.github.com/3874826 Edit: Loaded the page and got interrupted by lunch. Shows me for not refreshing.

That's awesome -- thanks for posting

Re: Prismatic's "Graph" at Strange Loop

#29
post #28

Happy to see you're opensourcing. Are you planning to do the same with Flop and Optimize?

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.

Re: Prismatic's "Graph" at Strange Loop

#30
post #14
post #12

If I understand the nature of this system, it's essentially a higher-order function composition tool. Correct? Nit, defnk? what about def-kw-func or something? not wholly readable as defnk.

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.

There was a defnk at one time in one of the Clojure libraries (I think it was even created by Rich himself), but it disappeared at some point. Nathan Marz created a defnk macro in Storm that he uses for the same thing. Maybe it's time for Clojure to bring defnk back if it offers some advantages over the :keys destructuring.
Post reply on HN