HNHacker News
TopNewBestAskShowJobs

jedschmidt

1,259 karma · joined May 14, 2010

http://jed.is
submissionscomments
jedschmidt··on dōmo: Markup, style, and code in one language
This is great feedback.

- The caps are there to prevent global namespace collisions, since the chances of UPPERCASE global variables existing is smaller. I don't want to add lowercase names to the global, but they would be fine on the domo object itself, so maybe I should put both UPPER and lower there anyway.

- The CSS may be more verbose that LESS in JavaScript, but it compiles much faster and there's only 228 of code needed to get it. If you want sugar, just use CoffeeScript and it's probably even cleaner than LESS.

https://github.com/jed/domo/blob/master/docs/index.coffee#L1...

- The STYLE keyword is just there because that's where the "on" function lives. You could assign it to a local variable make the reference shorter.

- Yes, with bare JavaScript this is probably true, but the idea is to make sugar optional. Add your own and it looks like HAML:

https://github.com/jed/domo/blob/master/docs/index.coffee#L3...

jedschmidt··on dōmo: Markup, style, and code in one language
I (the author) agree. It's not for nostalgia's sake, but to avoid namespace collisions on the global object.
jedschmidt··on dōmo: Markup, style, and code in one language
Right. This entire page could've been rendered on the server. The point is that you can choose the best tradeoff for your app.
jedschmidt··on dōmo: Markup, style, and code in one language
Hello there, author here.

I'm still working on how to get the message across, but the idea is this:

We all know CSS. We all know HTML. Most of us agree that neither is powerful enough to build modern web apps, hence the explosion of CSS-preprocessors and templating engines.

If we're going to build tools to improve browser technologies like CSS and HTML, let's build them using another browser technology: JavaScript. Instead of adding incompatible extensions to CSS and HTML, let's first port them as-is to JavaScript syntax and then do the extending there, where at least the tools we build will interoperate.

Instead of learning increasingly arcane/proprietary/underpowered syntax for looping or doing arithmetic or writing functions, let's just use the tools we already have. Not to mention this gives us a streamlined development process and lower cognitive overhead for free.

Feedback welcome.

jedschmidt··on dōmo: Markup, style, and code in one language
Hey there (author here), can you explain what you mean by decoupling? I'm not sure how this is any less decoupled; you can still keep everything modular in separate files/systems. You can use this to compile your CSS and still LINK it as a separate file, for example.
jedschmidt··on dōmo: Markup, style, and code in one language
Exactly. Instead of learning arbitrary meta-languages on top of these technologies, I think we're better off just porting the syntax to JavaScript and using a more reliable and well-tested foundation to build abstractions.
jedschmidt··on If I was your cloud provider, I'd never let you down
Don't hate the provider, hate the meme:

http://knowyourmeme.com/memes/overly-attached-girlfriend

jedschmidt··on Rendering templates obsolete
These are definitely good concerns.

- Performance: It's about half of Underscore.js on Webkit[1], so it's not so horrible, and has yet to be optimized at all (such as by using document fragments, etc.)

- Readability: The JS statement here is only long to show a unified example. Since the inputs and outputs of each call are DOM nodes, everything is trivially composable, something not possible with XML/CSS.

- Error recovery: Yes, having seen the error output of things like LESS, I see this as a feature.

- Namespacing: Absolutely agree. I think this is best solved the way jQuery and other libraries do it: pollute by default, and then let the developer "opt out" using noConflict.

[1]: http://jsperf.com/underscore-vs-domo/

jedschmidt··on Rendering templates obsolete
You can still preserve modularity by pulling styles and markup into their own JavaScript modules and requiring them as you would any other module.
jedschmidt··on Browserver: A web server inside your web browser
As discussed previously on HN: http://news.ycombinator.com/item?id=4366555
jedschmidt··on T.js - A tiny templating framework in ~400 bytes
The text node approach is cross-browser, whereas I don't think this works on oldIE.
jedschmidt··on T.js - A tiny templating framework in ~400 bytes

    new Option("<div>in the browser, yes.</div>").innerHTML
jedschmidt··on Browserver: a node.js HTTP server, in your browser
I chose hosts over paths for disambiguation because I want the request passed to the proxy to be as close as possible to that passed to the browser.
jedschmidt··on Browserver: a node.js HTTP server, in your browser
Thank you for explaining this much better than I did!
jedschmidt··on Browserver: a node.js HTTP server, in your browser
Okay, it's here:

https://github.com/jed/browserver.org

jedschmidt··on Browserver: a node.js HTTP server, in your browser
Hard to tell right now... I started at Joyent's smallest node.js offering (1GB) and then ramped it up to 8GB when the load hit. The server is crashing a lot, but it's not very easy for me to debug right now.

Let me get back to you once the dust settles, deal?

jedschmidt··on Browserver: a node.js HTTP server, in your browser

    It merely receives proxied requests, does some stuff to it, then sends it back to the proxy, which returns it to the client.
You just described the majority of the web servers that we web developers deal with. Sure, it's a proxy, but the fact that the machine responding is connected via WebSocket and not a local network doesn't make it any less of a server, in my opinion.
jedschmidt··on Browserver: a node.js HTTP server, in your browser
Indeed, this isn't entirely original, and I know services like this exist. To me, this is what PUSHER's API _should_ have been.
jedschmidt··on Browserver: a node.js HTTP server, in your browser
Good point. I'll get to githubbing the browserver.org site itself now.
jedschmidt··on Browserver: a node.js HTTP server, in your browser
Ha, tinco beat you to that joke. The server is the smallest instance that Joyent offers right now... hopefully it'll hang in there during the HN rush.
jedschmidt··on Browserver: a node.js HTTP server, in your browser
Hey all,

I put browserver together in my free time over the last week. It's still a bit of a toy, but I think it's useful to explore ideas around extending webhooks all the way to the browser, to simplify our increasingly complicated web architectures.

It's already late here in Tokyo, but I'll be up for a bit if anyone wants to chat/brainstorm about approaches like this (and also to make sure the server stays up).

jedschmidt··on Dynasaur: A DynamoDB ORM for Node.js
Looks great, Travis.

One thing: you should consider building this on jed/dynamo-client[1] instead of jed/dynamo. I refactored the former out of the latter last week, adding exponential back-off retry and the ability to specify custom hosts for better testability. Also, I'll be refactoring jed/dynamo myself in the near future, which will introduce breaking some API changes.

    [1] https://github.com/jed/dynamo-client
jedschmidt··on Node.js - Convincing the boss guide
I recently built SAJAK (Simple Authenticated JSON API Kit) to suit my own needs: https://github.com/jed/sajak
jedschmidt··on The GitHub Styleguide
Here's a more accurate tl;dr of their JavaScript style guide:

    $ curl -I https://github.com/styleguide/javascript

    HTTP/1.1 301 Moved Permanently
    Location: https://github.com/styleguide/coffeescript
jedschmidt··on Codestre.am: streaming your code to the masses
In case you're curious, yes, codestre.am even passes the inception test: http://codestre.am/s
jedschmidt··on A Tour of Amazon's DynamoDB
I've been waiting for Mathias to write something like this, and I'm glad he didn't waste any time diving in. For those who don't know him, he has more breadth in the area of emerging datastores than anyone I know; he literally wrote the book on Riak[1].

I've also been acquainting myself with the DynamoDB API over the past week, and am building a node.js binding that I hope will abstract away most of the esoteric aspects of interacting with it. It has full API coverage currently and is tested in Travis[3], so now I'm writing the high-level interface. So far I've covered about half of the operations DynamoDB offers, but would love to hear any ideas/feedback.

    [1] http://riakhandbook.com/
    [2] https://github.com/jed/dynamo
    [3] http://travis-ci.org/jed/dynamo
jedschmidt··on A turing machine in 133 bytes of javascript
I'm sure there's room left that the 140byt.es folks will find, but off the bat:

    e=0;while(d!=c)
    for(e=0;d!=c;)
jedschmidt··on The Fundamentals, Primitives and History of HTML5
I loved this presentation. But just out of curiosity, why aren't these techniques (not closing tags or quoting attributes) used in HTML5 Boilerplate?
jedschmidt··on Why You Should Move To Berlin
Awesome! So Real Berlin is:

    - Blasting techno while barking English at the locals
    - Making fun of big-boned folks enjoying their dinner
    - Dancing drunk in broad daylight in oncoming traffic
Kreuzberg has been my second home for the past year, but it's stuff like this that makes me wish my fellow Americans would leave these kind of antics back home.
jedschmidt··on Hacker News Tokyo Japan Meetup #8 – Friday 21st of October
Won't be back in Tokyo in time, but will see y'all in November.
← PreviousPage 2 of 4Next →