Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tjansen
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
45 ms
·
451.
▲
by
tjansen
13y ago
And I believe it is. It does not support every single feature that jQuery and MooTools have, but you probably wouldn't say that jQuery is not fully featured because it lacks support for Cookies and color animation. It's true that
452.
▲
by
tjansen
13y ago
There are a lot of specialized features in jQuery that Minfied does not have. For example, the only way to register an event with Minified is using on(). jQuery has on() as well, but it also has a number specialized functions like 'cl
453.
▲
by
tjansen
13y ago
In the standard version on zeptojs.com? Just did a short search on the source code and can't find any 'define' invocations.
454.
▲
by
tjansen
13y ago
Frankly it is an arbitrary number, mostly. I started with the goal of having no more than 7 functions, because that's the number of functions the first version had. It didn't take long for me to figure out that this wasn't en
455.
▲
by
tjansen
13y ago
I thought that 'alternative to jQuery or MooTools' makes it very clear that it's just a library that offers similar functionality, especially since I mentioned two completely incompatible libraries. Unfortunately I don't
456.
▲
by
tjansen
13y ago
Personally I don't think it's worthwhile to use a large number of micro-libraries, because of the huge overhead that comes with it. Every library has slightly different naming conventions, you have to be sure that they play well w
457.
▲
by
tjansen
13y ago
What's funny is that it hardly makes any difference. If you feed the source code into Closure in advanced mode, the size is 9258 bytes pre-gzip and 4109 post-gzip. In simple mode, the numbers are 9267 pre-gzip and ... also 4109 post-g
458.
▲
by
tjansen
13y ago
Not at all. While some things use a similar syntax, Minified is not compatible with jQuery (and does not try to be).
459.
▲
by
tjansen
13y ago
My replacement for more advanced CSS features are the methods filter(), sub() and collect(). For example, instead of $('li:odd') you would write $('li').filter(function(v, index) { return index%2;}). But, admittedly, if
460.
▲
by
tjansen
13y ago
No, actually I wasn't really interested in that yet. I wouldn't expect it to be that bad performance-wise, but if performance would be my goal, there'd be a number of things I would have done differently. I also guess that al
461.
▲
by
tjansen
13y ago
Actually there's a builder that allows you to pick the functions you need and compiles custom versions: http://minifiedjs.com/builder/ I don't think that this is a practical approach for most people though. A
462.
▲
by
tjansen
13y ago
What exactly would you miss (other than some utilities like each(), which are I would like to keep out of the library)? Actually one of the ways I used to decide what features to squeeze in was making a list of all jQuery functions and re-
463.
▲
by
tjansen
13y ago
Actually my goal is that the library will always stay under 4kB. Setting yourself a limit is the only way to prevent feature creep, and 4kB seems quite ok. Over time, when support for older browsers can be dropped, there will be space for a
464.
▲
Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
(minifiedjs.com)
158 points
by
tjansen
13y ago
|
142 comments
465.
▲
by
tjansen
13y ago
b/c solar cells will be around for a long time Are you sure about that? It's something I always wondered. The efficiency of today's solar panels is 15%-20%. According to a short google search, researchers have already shown
466.
▲
by
tjansen
13y ago
Because if you impose tariffs on such goods, these countries will never be able to improve their standard of living. The lower standards give them a chance to produce for lower prices and thus participate in the global market. If you look a
467.
▲
by
tjansen
13y ago
I wonder whether the Chinese manufacturer are really dumping them, or whether the German companies only had high prices from the beginning. Companies like Siemens and Bosch aren't exactly known for low prices or efficiency. Massive gov
468.
▲
by
tjansen
13y ago
The great thing about Promises/A+ is that it's so small. I have implemented it in 375 bytes, and was even able to add two convenience functions: https://github.com/timjansen/PinkySwear.js
469.
▲
by
tjansen
13y ago
I usually try priorityclub.com (Intercontinental Hotel Group) first, because I collect their points, have by far the highest loyalty status at PC/IHG and Staybridge Suites is my favourite hotel chain. If there is no acceptable hotel nearby,
470.
▲
by
tjansen
13y ago
The bill won't have any significant impact on most customers because cable channels won't charge the cable companies any less. If a cable companies has to pay, say, $1 Mio to distribute a channel, it needs the subscriptions to pay for that.
471.
▲
by
tjansen
14y ago
It's confusing to have three lights for a single stop line, especially the light on the left is odd. You don't know which of the traffic lights apply to you and it makes you look for another stop line.
472.
▲
by
tjansen
14y ago
I don't understand the correlation between the position of the lights and the position of the stop line. You can have a stop line 10 feet away from the intersection and still have traffic lights on the other side. Actually, in my experienc
473.
▲
by
tjansen
14y ago
True, but they are not always so much easier to see if you are in the first car. Also, if you need three lights instead of one, I think that is a sure sign that the design is broken.
474.
▲
by
tjansen
14y ago
Here in Germany as well, but then it gets really confusing. My favorite example is this intersection: https://maps.google.com/maps?q=K%C3%BChlwetterstra%C3%9Fe,+D... It has three lights, only two of them positioned at the stop line.
475.
▲
by
tjansen
14y ago
I know, but then you should do the same for pedastrians.
476.
▲
by
tjansen
14y ago
My pet peeve in Europe is the positioning of traffic lights. It drives me crazy that they not on the opposite side of the intersection, like in the US, but at the stop line. If you are in the first car at the stop line, then they are right
477.
▲
by
tjansen
14y ago
First thought: Looks great, artwork is fantastic. Second thought: I don't have kids and maybe I don't have a clue, but I wonder whether kids will understand it, especially the concept of numeric temperatures. What age group are you aiming t
478.
▲
by
tjansen
14y ago
He gives a lot of political reasons for that, and I agree fully with them, but in the end the only thing that matters is the resulting product. Don't get me wrong, I am very thankful for what Mozilla did for the web at a time when IE was pr
479.
▲
by
tjansen
14y ago
When you still need to explain why Mozilla matters, despite a market share of ~20%, I guess it's already doomed... Practically nobody uses a browser, or any other product, only to "fight monoculture". It may be an honorable goal, but a prod
480.
▲
by
tjansen
14y ago
If you send people just the files, without hosting, you are limiting your target group to pretty technical people who know how to maintain their web space.
More ›