News for hackers. Stuff that matters.
Re:Show HN: Umbrella JS, a 2kb jquery alternative by franciscop on Friday January 22, 2016 @12:33PM (#10954195)
OP here, I created this for fun then it started growing and now I released it in case anyone want to play with it, I hope you like it. It's not a clone of jquery so it's not exactly like Zepto.js.

I specially love the build system I made with grunt, so each new function is just a folder in /src/plugins and it includes the "documentation.md" and "test.js" automagically.

PS, yes, it has bugs and it's probably not production-ready. However I would love as much feedback as possible. Of course ask me anything you want (:

Re:Show HN: Umbrella JS, a 2kb jquery alternative by andreasklinger on Friday January 22, 2016 @12:45PM (#10954295)
unsure if relevant to you - but you might be able to show the documentation.md in the github directory view worstcase by renaming it to readme.md
Re:Show HN: Umbrella JS, a 2kb jquery alternative by franciscop on Friday January 22, 2016 @12:50PM (#10954345)
Hey thanks for the tip, I preferred to show a "Getting Started" and general information instead of the library documentation itself in the readme, I think it made more sense.
Re:Show HN: Umbrella JS, a 2kb jquery alternative by ChristianBundy on Friday January 22, 2016 @04:23PM (#10955684)
GitHub actually shows a README file for each directory (if one exists), so the recommendation was to change /src/plugins/x/documentation.md to /src/plugins/x/README.md so that you could see the documentation on this page: https://github.com/umbrellajs/umbrella/tree/master/src/plugi...
Re:Show HN: Umbrella JS, a 2kb jquery alternative by franciscop on Saturday January 23, 2016 @09:57AM (#10958556)
wow this is great! Thanks for the tip, I'll do it for sure
Re:Show HN: Umbrella JS, a 2kb jquery alternative by mc_hammer on Friday January 22, 2016 @12:40PM (#10954258)
cool. gj.

nice website btw

Re:Show HN: Umbrella JS, a 2kb jquery alternative by johnhenry on Friday January 22, 2016 @01:03PM (#10954428)
I like it! Since it's a jQuery alternative, I wonder if you've considered having the global name default to "$" rather than "u"?
Re:Show HN: Umbrella JS, a 2kb jquery alternative by franciscop on Friday January 22, 2016 @01:20PM (#10954532)
It was somewhere in the documentation but I took that off deliberately since it's not really 100% compatible, so it'd just confuse people long-term.

> Edit: HN killed all the fun, I am refering to this character: http://www.fileformat.info/info/unicode/char/2602/index.htm

Funny enough, the name actually comes from the fact that unicode characters are accepted. First it was just a wrapper for document.querySelector(), and looking for a single character for the name I found out that this could be used:

    [umbrellachar]('.demo')
Of course in the end I decided against it, but for some time the official name of the library/function was just that character.
Re:Show HN: Umbrella JS, a 2kb jquery alternative by zyxley on Friday January 22, 2016 @04:53PM (#10955827)
Now I'm wondering how long until we start seeing frameworks use Unicode like 𐅭 or 𒌔.
Re:Show HN: Umbrella JS, a 2kb jquery alternative by huskyr on Friday January 22, 2016 @03:21PM (#10955332)
Nice. There seems to be a resurgence of jQuery alternatives, see also Lea Verou's Bliss: http://blissfuljs.com/
Re:Show HN: Umbrella JS, a 2kb jquery alternative by franciscop on Friday January 22, 2016 @03:57PM (#10955571)
I didn't know of that, I'll surely try to contribute, thanks! (:
Re:Show HN: Umbrella JS, a 2kb jquery alternative by pram on Friday January 22, 2016 @03:47PM (#10955505)
wow your page uses an incredible amount of resources lol

http://i.imgur.com/I9zeKxm.png

Re:Show HN: Umbrella JS, a 2kb jquery alternative by HCIdivision17 on Friday January 22, 2016 @03:58PM (#10955577)
I've got 165,372K, which is still a bit high, but not that high. The Economist tab is at 97,144K, Outlook is 84,340, and HN is 28,016K.

I think part of it is from the GPU: my GPU memory was marginally smaller than Umbrella's tab's usage once I turn to it (and slowly went down to 95,000k when I left). So maybe it's the little droplets or something.

Re:Show HN: Umbrella JS, a 2kb jquery alternative by franciscop on Friday January 22, 2016 @03:55PM (#10955564)
I don't know why, I know that the rain/cloud animation is really CPU-intensive so it might be cached? Do you mind testing the same for /documentation where there's no animation, please?
Re:Show HN: Umbrella JS, a 2kb jquery alternative by HCIdivision17 on Friday January 22, 2016 @04:02PM (#10955608)
I got about 20,000K for that page. The animated page does seem to climb a bit, but now that I've reloaded the page, it doesn't seem to be that high, sticking around 21,000K. So... maybe it just wasn't releasing all the memory as fast or something in Chrome?
Re:Show HN: Umbrella JS, a 2kb jquery alternative by tuananh on Friday January 22, 2016 @11:11PM (#10957152)
almost 600MB of memory on mine !!!
Re:Show HN: Umbrella JS, a 2kb jquery alternative by GordonS on Monday January 25, 2016 @10:36AM (#10967703)
Note that it's 2kb when gzipped - but that is still a fraction of the size of jQuery when gzipped.
Re:Show HN: Umbrella JS, a 2kb jquery alternative by franciscop on Wednesday January 27, 2016 @08:12PM (#10985216)
Sure, but what developer slightly concerned about website weight doesn't gzip them? (:
Re:Show HN: Umbrella JS, a 2kb jquery alternative by coppolaemilio on Friday January 22, 2016 @12:36PM (#10954225)
What is the current browser support?
Re:Show HN: Umbrella JS, a 2kb jquery alternative by franciscop on Friday January 22, 2016 @12:47PM (#10954325)
I test it regularly in IE11, Firefox and Chrome (last two in desktop and mobile). It might work in older IE versions, but it's not a goal since IE10 share is 0.85%, IE9 is 0.88% and IE8 is 1.15%, all of them decreasing month by month [1].

However it supports mobile much better since it'll load super-fast (:

[1] http://gs.statcounter.com/#desktop+mobile+tablet-browser_ver...