G

Guillermo Rauch

devthought.com · Personal blog · on HN since 2009

Guillermo Rauch, creator of Socket.IO, wrote early Node.js and JavaScript posts about objects, tooling, browser bugs, and conference talks.

What HN saysHN links 'An Object is not a Hash', which one commenter calls naive and dangerous over reserved property names. Other links cover his tweet-filtering proxy and an RMS anecdote.
27HN people shared it
8linked it in comments
26stories submitted
536story points
11 years agolast shared
2009people per year2026

Most-shared posts

  1. 1
    An Object is not a Hash
    7 people · 75 points · first shared 2012 · 73 comments on HN
  2. 2
    Rms has his bag stolen in Argentina
    2 people · 92 points · first shared 2012 · 112 comments on HN
  3. 3
    JSConf 2010 Slides compilation
    2 people · 44 points · first shared 2010 · 1 comments on HN
  4. 4
    A String is not an Error
    2 people · 27 points · first shared 2011 · discussion on HN
  5. 5
    Node.native, NodeJS and Luvit(Lua) Showdown
    2 people · 13 points · first shared 2012 · 2 comments on HN
  6. 6
    A tweet filtering proxy in node.js
    2 people · 4 points · first shared 2012 · discussion on HN
  7. 7
    Understanding the iOS6 AJAX bugs
    2 people · 3 points · first shared 2012 · discussion on HN
  8. 8
    Chrome SPDY indicator (extension)
    1 people · 59 points · first shared 2012 · 12 comments on HN
  9. 9
    The Realtime Engine
    1 people · 52 points · first shared 2012 · 5 comments on HN
  10. 10
    Bash as a Service
    1 people · 43 points · first shared 2012 · 20 comments on HN
  11. 11
    Node.JS and the WebSocket protocol
    1 people · 31 points · first shared 2009 · discussion on HN
  12. 12
    A better console.log
    1 people · 28 points · first shared 2012 · 6 comments on HN
  13. 13
    Accessing a MySQL database from Node.JS
    1 people · 27 points · first shared 2009 · 14 comments on HN
  14. 14
    Getting rid of stale transactional email
    1 people · 19 points · first shared 2013 · 4 comments on HN
  15. 15
    The four stages of programming competence
    1 people · 12 points · first shared 2009 · 5 comments on HN

What HN people wrote when they linked it

malandrew · 2013-08-07
No you don't: http://www.devthought.com/2012/01/24/filtering-tweets-for-your-favorit… Proxlet did this as a service back in the day. I've been toying with the idea of creating a project based on Guillermo R's post with a social component for sharing regexes and rules. The truth is that this type of local proxy should be a generalizable service for every service you consume.
dyoo1979 · 2015-07-12
... Yikes. The advice in this post is unfortunately naive. It's dangerous to allow arbitrary object attribute key content. Some object properties in JavaScript must be treated as reserved. Allowing arbitrary access to key names has unexpected repercussions. For example, consider "prototype" or "hasOwnProperty" as key names. See: http://www.devthought.com/2012/01/18/an-object-is-not-a-hash/ for more details. So I'd +1 jestar_jokin's advice: use code that's been well-tested. The code presented in the original poster's "Hash Tables in Javascript" article does not look robust.
anon1385 · 2014-12-13
>The nicest part of it is the built-in hash table type and the related syntactic sugar that everyone for whatever reasons insists on calling "object". People call it an object because that is what it is. If your code is using Javascript objects as general purpose hash tables with the normal syntactic sugar then your code is broken[1]. The correct way to use an object as a hash table involves a bunch of ugly extra syntax that makes it more verbose than hash tables in any other language I'm aware of. [1] http://www.devthought.com/2012/01/18/an-object-is-not-a-hash/
shabble · 2012-10-09
Also see http://www.devthought.com/2012/01/18/an-object-is-not-a-hash/ from earlier about some pitfalls that you might not immediately consider. (HN Thread: https://news.ycombinator.com/item?id=4629544)
petercooper · 2012-03-11
Similar in C++11: https://github.com/d5/node.native And a simple example of using it (for a hello world benchmark): http://www.devthought.com/2012/02/08/node-http-hello-world-showdown/
masklinn · 2012-12-31
It's a bit sad that one of the most useful cases for `Object.create` was not covered: it is the only way to create an object without a prototype. Using constructor functions, even if you explicitly set the ``prototype`` to ``null``, instances's ``__proto__`` remains ``Object.prototype``: > var F = function () {}; > F.prototype = null; null > (new F).__proto__ === Object.prototype; true This means all the "default" object methods are there (e.g. #hasOwnProperty) and ready to get clobbered with all the risk it entails[0]. With ``Object.create(null)``, however, the __proto__ of the created object is effectively ``null``: > Object.create(null).__proto__ null and such pesky methods as #hasOwnProperty or #toString are not there for clobbering. And an issue of Object.create failed to be mentioned as well: you can't use ``instanceof`` directly, you have to create one-off "constructor functions" to call ``instanceof`` on them. [0] http://www.devthought.com/2012/01/18/an-object-is-not-a-hash/

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close