HNHacker News
TopNewBestAskShowJobs

dribnet

179 karma · joined October 10, 2012

submissionscomments
dribnet··on Array.js: A better array for the browser and Node.js
Having worked on a similar project for clojurescript (1), I've found that the main challenge to using this "array spoofing" technique widely is interop with other libraries. For example, angular.js internally has inconsistent ways of validating an object is an array, sometimes bottoming out in Object.toString and other times instanceof Array. Many libraries behave similarly, and so array.js objects will not behave as expected if handed off.

On the other hand, interop with D3.js has been ideal as it generally assumes that any non function parameter is an array, so there I"ve had more success and would expect array.js to similarly work well.

(1) https://github.com/dribnet/strokes

dribnet··on Steve Jobs' exchange with Palm CEO Ed Colligan
tldr:

I, Ed Colligan (ex Palm CEO), swear to god this happened:

  steve: let's not hire each other's employees anymore, m-kay?
  ed: thanks steve, but no thanks.
  jobs: have you seen our patents and pile of cash, ed?
        you're entering a world of pain.
dribnet··on Functional Reactive Programming with Bacon.js
Sad to see you downvoted. Apparently responsible naming is a valid HN topic only when the library has titillating name with gender bias like upskirt [1] or pantyshot [2].

Maybe a better name would be pigfucker.js so as to more equitably offend everyone. But that's probably not necessary since I bet bacon.js was named after Francis Bacon anyway - right nullzzz? :-)

[1] http://news.ycombinator.com/item?id=2729320

[2] http://news.ycombinator.com/item?id=2748669

dribnet··on Getting hyper about hypermedia APIs
> One neat trick that I think is worth adding to the discussion: URL templates.

100% agree - URL templates enable succinct discoverability. Moving link generation to the client reduces computation time on the server which no longer has to generate inline links as well as the payload size of the response.

The RFC6570 spec is great, has numerous implementations[1] and a through test suite[2]. I am also surprised that this is not a standard part of every hypermedia implementation.

[1] http://code.google.com/p/uri-templates/wiki/Implementations

[2] https://github.com/uri-templates/uritemplate-test

dribnet··on ClojureScript Compiler Compiled with ClojureScript
And if you are lucky enough to be dealing with a functional javascript library like d3, you can even use cljs functions as arguments to your js library. This leads to very succinct and powerful interop.

For example:

  (.timer js/d3 (fn []
        (-> root (.selectAll "g") (.data curClockData)
            (.select "path")
            (.attr "class" #(str (:key %) (:which %))))
        ; return false to keep running
        false))))
This snippet does this twice to provide a longish function to the d3.timer call and a small inline one to attr to set a class based on the data in the selection. More context available: http://bl.ocks.org/4326896

ObTopic: cljs in cljs does sound dreamy. Would this also enable <script type="text/clojurescript">?

dribnet··on Google's Common Lisp style-guide
This further reinforces how Yegge's recent "software political axis" rant was wildly inconsistent. His characterization of Clojure was "highly conservative" based in part on the best practices avoiding macros when possible, unlike "liberal" languages including Common Lisp.

Meanwhile in his own company's coding style for Common Lisp states very similar best practices regarding macros -- they should be used "sparingly and carefully", "You must never use a macro where a function will do.", etc. The whole macros section basically reads as a list of well thought out reasons against using macros when writing code that other people will have to maintain.

Yegge: "I trust that if you know anything about Lisp, your blood is basically boiling at this point." Really? Well then maybe the google CL team doesn't know lisp or otherwise are looking for novel ways to escalate their collective blood pressure.

dribnet··on Codeq
Hmmm, how about...

A smarter and faster version of git-bisect - given an anonymous function, when does the answer returned change working backwards through the codebase?

Or perhaps time warp integration - request a build of project foo but with library bar from the last tagged release version and function baz from a year ago.

dribnet··on Zynga stock plummets below value of its cash and real estate
> they played the startup lottery hoping to get rich, and lost.

What?!? Folks: ZNGA still has a market cap of almost $2 billion. Your average startup engineer is lucky to see any decent and timely exit event. So even at these "low" prices, from where I sit they are still looking better than many of their peers.

← PreviousPage 2 of 2