News for hackers. Stuff that matters.
Re:Socks - A javascript UI toolkit inspired by Shoes by Sephr on Sunday May 17, 2009 @06:11PM (#613999)
IMO, a better MIME type would be application/socks+ecmascript or application/socks+javascript instead of application/javascript-socks. That looks closer to how content types that are built on XML have their MIME types. For example, XHTML's MIME type is application/xhtml+xml, not application/xml-xhtml.

Also, a shoes-like syntax is already available in JavaScript, though it would be very hard to utilize as-is (in <JS 1.7, wrap in a function and use `var' instead of `let'):

    app: {
      stack: {
        para("Foo 1"); // para as a function
        para: "Foo 2"; // para as a label
        button: {
          let bar = new Button("Bar");
          bar.onclick = function() { alert("Baz!") }
        };
        flow: {
          style: ({ // CSS block
            color: "red",
            after: {
              content: "!"
            }
          });
          para("This is red and ends with an exclamation point");
        }
      }
    }
Re:Socks - A javascript UI toolkit inspired by Shoes by raingrove on Monday May 18, 2009 @02:49AM (#614530)
thanks a lot for your insight. will look into fixing those in future releases
Re:Socks - A javascript UI toolkit inspired by Shoes by chaosmachine on Sunday May 17, 2009 @06:39PM (#614022)
This project makes the same mistake Prototype does: Using the unmodified name of an existing tech concept.
Re:Socks - A javascript UI toolkit inspired by Shoes by omouse on Sunday May 17, 2009 @06:26PM (#614012)
I started a similar project last year during the summer: http://github.com/omouse/sandals/tree/master

I called it Sandals and it's dead mainly because I'm lazy but also because I find it stupid to re-invent the wheel. YAY yet another UI toolkit to learn grumble

Re:Socks - A javascript UI toolkit inspired by Shoes by helium on Monday May 18, 2009 @08:09AM (#614820)
Hmmm... pretty cool. I wrote a little sample app for this that will generate a sierpinski triangle:

http://cloud.github.com/downloads/petejkim/socks/socks-chaos...

And the code: http://gist.github.com/113435

Re:Socks - A javascript UI toolkit inspired by Shoes by andreyf on Sunday May 17, 2009 @09:08PM (#614157)
That doesn't look like JS syntax... am I missing something, or are they using JS to parse/interpret it?
Re:Socks - A javascript UI toolkit inspired by Shoes by jayro on Sunday May 17, 2009 @09:17PM (#614168)
It's JavaScript object literal syntax.
Re:Socks - A javascript UI toolkit inspired by Shoes by misuba on Monday May 18, 2009 @02:51PM (#615456)
No - the application/javascript-socks scripts are putting Ruby-style code blocks in places JavaScript doesn't generally allow them. Presumably that's the reason for the alternate MIME type on the script.
Re:Socks - A javascript UI toolkit inspired by Shoes by jcapote on Sunday May 17, 2009 @06:03PM (#613995)
Looking over the api it's pretty thorough and the custom controls look very polished; nice work.