Live data from Hacker News

ƒu.js - The Functional DOM traversing library.

tsenart.github.com

11–20 of 47 posts

Re: ƒu.js - The Functional DOM traversing library.

#12
post #10

Why would you use this over normal querySelector{All}? Also, why do you define a window.typeOf global? It completely defeats the purpose of using a clousure. You also seem to be checking `typeof value.length == 'number' && typeof value.splice != 'undefined' && !value.propertyIsEnumerable('length')` to determine if something is an Array. First of all, the recommended practice is to check Object.prototype.toString.call…

I think you bring up valid points, but you should work on delivery. Your post is very offensive to read, even from someone who has no stake in this library whatsoever - even though I think you're right.

You've also got a lot of typos.

So, try to be helpful and encouraging instead of damning and dismissive? I'd appreciate that, and be more open to what you're saying.

Re: ƒu.js - The Functional DOM traversing library.

#13
post #10

Why would you use this over normal querySelector{All}? Also, why do you define a window.typeOf global? It completely defeats the purpose of using a clousure. You also seem to be checking `typeof value.length == 'number' && typeof value.splice != 'undefined' && !value.propertyIsEnumerable('length')` to determine if something is an Array. First of all, the recommended practice is to check Object.prototype.toString.call…

Ouch. There is value in being able to handle extremely harsh criticism. There is also value in being able to say things nicely, with the knowledge that your words will be more easily heard by the person on the other end, and put to use rather than dismissed out of anger.

Re: ƒu.js - The Functional DOM traversing library.

#14
Umm how the hell am I suppose to type "ƒ" every time? I know I can "map" it to some other character, but that kinda defeats the purpose, no? Other than that it looks nifty, but since I'm already using jQuery in all of my projects I don't think I have much use for it.

Re: ƒu.js - The Functional DOM traversing library.

#15
post #10

Why would you use this over normal querySelector{All}? Also, why do you define a window.typeOf global? It completely defeats the purpose of using a clousure. You also seem to be checking `typeof value.length == 'number' && typeof value.splice != 'undefined' && !value.propertyIsEnumerable('length')` to determine if something is an Array. First of all, the recommended practice is to check Object.prototype.toString.call…

This may be irrelevant to original comment but does querySelector work in all modern browsers? My understanding was that it doesn't and so there is need for CSS selector engines like jQuery's sizzle.

Re: ƒu.js - The Functional DOM traversing library.

#17
post #14

Umm how the hell am I suppose to type "ƒ" every time? I know I can "map" it to some other character, but that kinda defeats the purpose, no? Other than that it looks nifty, but since I'm already using jQuery in all of my projects I don't think I have much use for it.

It's a Mac thing. Alt-f prints ƒ on Mac. On any other OS it's a pain in the ass. Granted, you can use fu but I think it would have been wiser to promote the usage of fu instead of ƒ.

Re: ƒu.js - The Functional DOM traversing library.

#18
post #5
post #4

Am I missing something here or do I really have to type the weird curly-F every time I want to call this? Having charmap open in my taskbar is not my idea of being productive. Plus, from my cursory glance this looks pretty similar, if not almost identical, to jQuery...

It is nothing like jQuery. It's a small utility library for easing your life when dealing with raw javascript. You can use ƒ or fu.

It's a lot like jQuery's $ selector mechanism and fluent API. Here's some of your examples compared to their jQ equivalents:

---

ƒ('selector1').ƒ('selector2').ƒ('selector3');

vs.

$('selector1 selector2 selector3');

---

ƒ('body').style.background = '#f4f6f8';

vs.

$('body')[0].style.background = '#f4f6f8';

---

for (var i=0; i vs.

$.each($('ul'), function(index, ul) { for(var i=0; i ---

I'm not even a jQuery user but I don't see a lot of difference in your approach versus jQuery's here. I already only use lightweight libraries like jQuery or Ext.Core for situations which call for only minor Javascript (read: not an RIA).

In what situations do you imagine your framework is more useful?

Re: ƒu.js - The Functional DOM traversing library.

#19
post #13
post #10

Why would you use this over normal querySelector{All}? Also, why do you define a window.typeOf global? It completely defeats the purpose of using a clousure. You also seem to be checking `typeof value.length == 'number' && typeof value.splice != 'undefined' && !value.propertyIsEnumerable('length')` to determine if something is an Array. First of all, the recommended practice is to check Object.prototype.toString.call…

Ouch. There is value in being able to handle extremely harsh criticism. There is also value in being able to say things nicely, with the knowledge that your words will be more easily heard by the person on the other end, and put to use rather than dismissed out of anger.

There's also value in being right, which he definitely is. Whether anyone likes it or not, brutal honesty pushes everything forward.

Re: ƒu.js - The Functional DOM traversing library.

#20
post #10

Why would you use this over normal querySelector{All}? Also, why do you define a window.typeOf global? It completely defeats the purpose of using a clousure. You also seem to be checking `typeof value.length == 'number' && typeof value.splice != 'undefined' && !value.propertyIsEnumerable('length')` to determine if something is an Array. First of all, the recommended practice is to check Object.prototype.toString.call…

I think you bring up valid points, but you should work on delivery. Your post is very offensive to read, even from someone who has no stake in this library whatsoever - even though I think you're right. You've also got a lot of typos. So, try to be helpful and encouraging instead of damning and dismissive? I'd appreciate that, and be more open to what you're saying.

His delivery is exactly what anybody is bound to get on the internet, and there's seriously nothing wrong with it. If you have an issue with brutal criticism like that, you should re-evaluate even spending time on this site.

This is, quite simply, the most _useless_ and badly written 'library' I've seen in some time. I applaud the author for pushing his work out there, but this is the part where you take criticism and run with it, fix it. Listen to Sephr, he's spot on.

Post reply on HN