Show HN: A functional tool-belt for Swift Language like Lo-Dash or Underscore - <AUTHOR> http://www.dollarswift.org/

<comment><AUTHOR> Not to be confused with jQuery, this project doesn't extend or monkey patch the collection using the extension features to keep it purely functional and to not override any methods via extensions if Apple decides to add those methods into the collection class themselves as part of the language update.</comment>


Use Rails 3.1 Hocus Pocus gem to edit your app like a wiki - <AUTHOR> http://blog.dio.jp/2010/12/21/hocus_pocus

<comment><USER2> I would love to hear what some other HNers think of this</comment>


LaTeX Coffee Stains (2012) - <AUTHOR> http://hanno-rein.de/archives/349 <comment><USER2> It's amazing how much of our modern world originated with Bell Labs:

[https://en.wikipedia.org/wiki/Lucent](https://en.wikipedia.org/wiki/Lucent)

"One source inside Lucent says that the logo is a Zen Buddhist symbol for "eternal truth", the Enso, turned 90 degrees and modified"

...now it's bothering me, how do you tell if a coffee stain has been turned 90 degrees?

<comment><AUTHOR> The tell-tell is the isolated drip from the coffee mug handle.</comment></comment>


The Joy of Coalholes - <AUTHOR> https://cheltonia.wordpress.com/2009/10/08/the-joy-of-coalholes/ <comment><USER2> It's interesting that I've probably walked over some of those, and not realized what they were; I thought coal normally went into the cellar through grilles.

I assume it wasn't the same for such covers, but a lot of ironwork, specifically railings, in Cheltenham was removed for the (second world) War Effort. That apparently was never useful for anything other than propaganda/morale value. I've had the impression that must have been more than most places, judging by the remnant bases. It doubtless did less damage than more recent Planners.</comment>


Border Patrol Raids a Non-Profit Providing Medical Aid to Immigrants in Desert - <AUTHOR> http://reason.com/blog/2017/06/20/border-patrol-raids-a-non-profit-providi <comment><USER2> The non-profit should be lauded for attempting to save lives.

The Border Patrol, unlikely to be lauded for anything these days due to their politicized function, is still performing the duties with which they are assigned: to patrol the boundary of their sovereign country and apprehend individuals who have crossed said boundary without permission from said country. It is hardly an American endeavor: the Mexican Border Patrol engages in the same activity ( [http://www.msnbc.com/specials/migrant- crisis/mexico](http://www.msnbc.com/specials/migrant-crisis/mexico) ) though under less public scrutiny.

According to this article (which desperately tries to avoid the "without permission" issue by calling these individuals _migrants_ ), four such individuals were apprehended. Which would imply that the "raid" was not simply harassment but part and parcel of the Border Patrol doing its job.

The article's rather inflammatory title and tone attempts to paint the Border Patrol as villains here, though beyond quoting the non-profit's statement, fails to present a compelling case nor provides any suggestion for how the Border Patrol _should_ conduct its duty.

<comment><USER3> The border patrol agents continually harass the volunteers and thwart their attempt to provide humanitarian aid. The camps have been very cooperative in getting the individuals they aid to the proper authorities once they've been restored to health. They have no ability or desire to house these migrants in their camps for any length of time.

Thing is, border patrol knows this yet they continue to harass these aid workers who are simply saving lives and getting people to the help they need.</comment></comment>


Finding Internships/Entry-level Programming Jobs for Working from Home? - <AUTHOR>

I am a mildly capable developer, but my lack of experience seems to scare off employers. I'm willing to put in the work to prove myself, but as I am studying abroad this year* , a traditional internship or entry-level position isn't really viable. What's the best way to go about finding work so that a year from now I can prove my competence?<p>* China, I can speak the language, but it's very competitive. The price of a work visa makes me an economically poor choice when the only advantages I can give are perfect translations to English and poor translations are good enough. <comment><USER2> Ask your school to help you find an internship.

You'll probably hear this a lot but, you should build something to show potential employers. It will also raise your confidence so you consider yourself better than mildly capable.

Network a lot until you find a niche where your language skills/cultural knowledge are advantageous.

Understand the labor laws of where you are.</comment>


A complete course on continuum mechanics - <AUTHOR> https://www.continuummechanics.org/ <comment><USER2> woah! cool. looking for more such resources XD.</comment>


Protests against Uber are heating up in Europe - <AUTHOR> http://online.wsj.com/articles/taxi-drivers-plan-big-protests-against-uber-technologies-across-europe-1402432899 <comment><USER2> I'd like to highlight this part of the article:

> _In several of the protests, drivers aren 't specifically targeting Uber and > other service providers, but what they say is outmoded regulation that makes > it hard for them to compete. Part of Uber's challenge in Europe is the > variety of regulations governing the continent, even among the 28-member > European Union, each of which has different unions and different rules._

It's easy to dismiss off the protestors as old hat for not reacting gracefully to a changing market, but the issue at least in London seems to largely be with the fact that their existing businesses are subject to more costs and regulations than the kinds that Uber and other services are facing.

So let's spare a thought for the taxi drivers who've spent years building up their skills and knowledge of the local area, especially in places like London [1], and hope that they can be given the opportunity to compete with Uber. After all, if it weren't for the existing Taxi industry it's possible companies like Uber wouldn't even exist.

There should be space in the market for both the traditional offering and the fancy new one, and I hope that they can learn from each other and improve as a result of the competition, rather than die out.

EDIT: To be clear, I'm not saying Uber should be forced to play by the rules. I'm saying that it might be time for the rules to be re-assessed based on developments in the industry.

[1]: In London, our famous black cabs are driven only by cabbies who've spent months learning London like the back of their hands in order to give their customers the fastest (and most interesting, in many cases) journey possible. See The Knowledge: [http://en.wikipedia.org/wiki/Taxicabs_of_the_United_Kingdom#...](http://en.wikipedia.org/wiki/Taxicabs_of_the_United_Kingdom#The_Knowledge)

<comment><USER3> As a London native for almost 10 years I cant tell you how many times I have been ripped off by black cab drivers taking longer routes then they could have. I also cant tell you how difficult it can be at certain times to find a taxi to take you home so people inevitably end up using unlicensed "mini cabs" to get home. This all because the licensing regulations are stuck in the stone age. Hopefully Uber will drag London kicking and screaming into the 21st century.

As a side note I also dont think there is anything stopping a London black cab driver from signing up for Uber.

<comment><USER2> No, I don't think so either. But that doesn't mean they should. Firstly, they might like driving their black cab a lot more than Uber's cars. I'm a big, big fan of the hackney carriage for the way it's designed specifically for carrying 5 passengers in this context.

Perhaps it would be nice to see Uber using hackney carriages, I dunno. At any rate, I agree that Uber should be a force for good here in improving the licensing regulations.

Personally I've always had good experiences with black cab drivers, and many times they've given me a discount. But I've also found the same thing with Uber drivers.

</comment></comment></comment><comment><USER4> I'm not sure I believe as strongly in the idea in places like London, where the official cab service is both highly regulated, and quite good.

In the US, the regulations for cabs tend to do little but drive up medallion prices. Uber cars are a much-needed disruption in terms of availability and quality, but you still can't really say that the drivers know much of anything about the city. If we had the equivalent of a London cab here in SF, I'd always choose that over Uber, yet I think you can probably undercut the price of an official taxi in London simply by ignoring the rules. That seems wrong.

If unregulated competition kills a _good_ taxi service, that seems like a drastically different outcome than what's happening here in the states.

</comment><comment><USER5> I just do not see why uber can be disruptive AND follow the rules. Here in Sweden they are lobbying to get exception from the rules, i.e. not having a meter and not having price comparisons on the cars.

It's not hard to be disruptive if you break the rules

<comment><USER6> But why require every car to have this bulky fixed function meter device when a smartphone app can do the job just as well?

Sometimes the rules themselves need to be disrupted.

<comment><USER7> > But why require every car to have this bulky fixed function meter device > when a smartphone app can do the job just as well?

Can it? How can us be certain that the smartphone is actually the one that was in the car when the rate was approved? How does "fixed rate advertised on the outside of the car" match up with ubers surge pricing? Why does a rule that the majority of the population evidently feels comfortable with need to be disrupted?

I don't think disruption is necessarily a good thing. It can be, but it also can bring a ton of negative results.

</comment></comment></comment><comment><USER8> Sad to see the taxi drivers. What they don't understand is that soon they will be obsolete. As many other groups. IT startups are extremely disruptive and changes like these are hard to stop. With Google driverless cars around, it's safe to say that in 30 years no one will need a driver. Uber and competitors could just buy driverless, extra-comfortable cars and get over with.

The problem is, what do you do with thousands of people working today as cabbies? Or you don't give a shit about a large % of the population not having an income (and thus not being a consumer).

<comment><USER9> Who is that "you" that is supposedly don't give a shit?

What's even more important, the tech disruption is coming to the vast range of industries and many jobs will be obsolete much sooner than most expect.

<comment><USER8> Sorry, might have made it clear. By 'you' I was referring to governments. What do you do as a government.

<comment><USER9> Cab drivers is just one small segment. That is a very good point to consider and even we, as a collective hivemind, on the HN don't pay enough attention to the problem of extreme rate at which jobs will diminish in the future. Start- ups won't solve that.

If we don't find a scalable, sustainable, viral business model to disrupt capitalism and focus on positive externalities humanity may be heading for a disaster and this one won't be a surprise.

</comment></comment></comment></comment><comment><USER10> It's interesting how the tech start-up community suffers from the same inability to shift perspective that Microsoft had when it became a powerful megacorp but still saw itself as the underdog.

Uber is not the plucky little start-up going up against big, slow incumbent corporations, like many tech start-ups did in the past.

Uber is the heavily funded 800-pound gorilla going after the livelihoods of the little guy.

So yes, some taxi-markets could do with changes, but the heavy handed and callous approach of greed-driven "disruption" is totally out of place here. We're talking ordinary hard working cab drivers, not fat cats in the boardroom of MegaCorp.

If anybody wonders where the growing hate against the tech community comes from, they may want to start looking in the mirror.

There's a difference between arguing that innovative disruption may temporarily cause some pain and openly pissing on those who find themselves on the wrong side of that change. There is way too much of the latter going on here.

<comment><USER11> I guess you haven't had the misfortune of being ripped of by London taxi drivers.

</comment></comment><comment><USER12> Taxi's in Dublin have been a problem for a long time especially for people with up the socioeconomic ladder. The quality of the vehicles can vary as well as the manner of the driver. Regulation states the vehicles have to be clean but the driver is welcome to wear whatever they like and they often wear tracksuits and often espouse racist views (especially against Nigerian taxi drivers) which undermines the perceived professionalism of the industry here.

Uber has really taken off here in part because the taxi industry wasn't catering to this need. I do believe Uber is following the rules because they aren't a taxi service. They can't pick up people who flag them down off the street. They really are just a very sophisticated private car service and shouldn't fall under taxi regulation. Since the credit card details are held by Uber it also ensures the passengers behave themselves unlike in normal taxis where drunk or rowdy people vomit or make a mess in the car putting the driver off the road for the night making the entire taxi service somewhat inefficient.

</comment><comment><USER13> It boils down to the simple question:

Would you rather live in a world where the service, its quality, reliability, cost and professionalism is that of the current taxi services or the newcomers like Uber?

I have personally been ripped off, deceived about the route and pricing and forced to put up with rude drivers and operators so many times and in so many places that I cheer any competition, be it public transport or car sharing.

</comment><comment><USER14> Why should we be excited for some US company siphoning off money from people who are already at the lower end of the wage scale?

</comment><comment><USER15> Not sure about the UK cabs way of work. But what stops them being a UBER cab driver as well? Isn't it a additional channel? Like in radio taxi can't they simple make themselves busy when they get UBER call so that the cab company does not assign them any additional pickup/drop?

<comment><USER16> At least in Sweden, to be a cab you have to clearly mark your car as a taxi, clearly post your rates in the window and have a verified taxi meter in your car to make sure you actually charge the posted rates, and Uber doesn't want to do any of those things.

</comment></comment><comment><USER17> Is this the first EU-wide strike, or has there been any such things in the past?

<comment><AUTHOR> EU-wide it is indeed the first one, but as far as I know there have already been quite a lot regional ones.

</comment></comment><comment><USER18> More people have heard about Uber thanks to these strikes than they ever would have (for the time being anyway...)

</comment><comment><USER19> Taxi drivers in Europe are paid a fraction of the profits they get from clients, most of it goes to taxes and the operators running the cab networks.

Uber's drivers are in a similar position.

So what do we have here? Another example of pitting poor against poor, for the interests of one group of rich against another, emerging, group of rich.

I almost admire the skillful orchestration at play here, although probably I shouldn't.

<comment><USER20> [http://www1.salary.com/CT/New-London/Taxi-Driver- salary.html](http://www1.salary.com/CT/New-London/Taxi-Driver-salary.html)

Not exactly poor but paid like many other jobs in London which probably don't come with tips. Trouble is that the internet has just about surplanted 'The knowledge' and made it available to all.

<comment><USER21> That appears to be a place in Connecticut, not the London under discussion here.</comment></comment></comment>


Ask HN: Advice - Working Full-time while starting a side business? - <AUTHOR>

I'm working full-time for the govt, while bootstrapping my SaaS product. The govt job is mind-numbingly terrible, but does allow me the flexibility to work on my product.
With that being said, its hard not to want to leave to follow my passion, especially when the environment I'm in for 8 hours a day is depressing, but I've got a family and bills to pay, so I'm doing my best not to lose my mind.
Interested to hear from others that have done the same, and looking back, what they may have done differently, if anything.  Time management tips, ways to keep yourself focused, and how to handle a bad full-time situation.  All advice/comments are greatly appreciated.  Thanks. <comment><USER2> Hi,

I've done exactly this (although my full time job is great, and I love it).

I think it is a really great way of dipping your toes in the water while keeping your risk low.

Time management:

I get up at 6, allowing me an hour and a half's work before the day job. I also work in the evenings for maybe an hour or two, and often at weekends. I'm lucky in that my fiancee is a medical student, who also needs to work evenings and weekends, so we tend to work together.

It is important to give yourself a day or two off now and then, or you'll burn out.

Focus:

I think the 'Lean Startup' lessons apply even more when you're working in your spare time on your product. Limited time means you have to be ruthless with your feature-set, find your market and users early, and don't waste time on unnecessary stuff.

Things you shouldn't be doing include Billing Systems, Automated Support, anything that isn't a key feature that is going to sell your service.

I'd also recommend not trying to use a new technology which you're not familiar with. Although there're huge benefits to using new languages etc, this isn't the time- you have very limited time, so any non-productive time looking up language/library features really eats into your time.

<comment><AUTHOR> Thanks. I've been following the lean lessons, and agree that its worked well. And I have learned my own lessons, the hard way with respect to using a new technology...I recently picked up RoR, but it was an uphill climb and cost me 2-3 months.

</comment></comment><comment><USER3> When you start to experience some break throughs with your SaaS you'll want to quit your job even more than you do now.

When I left my job, in hindsight I did it probably 1 or 2 months too soon. Which makes things difficult. When you feel you've got better things you could be working on - it's all too tempting to just stand up & quit.

The main things I would suggest are

1) Having a solid quitting point and make it realistic. That could be number of paying customers, savings in the bank, whatever fits your budget. When you're having a bad day at your day job, just keep reminding yourself you're still there because it's all part of the plan

2)Use your bootstrapping time wisely. Always plan in advance what needs to be done before you get your bootstrapping time. Whether that's making a list before bed, in your lunch hour etc you'll get the most out of your evening work times.

3)Stay social, bootstrapping time and family time should be of equal importance. Often you find when you're stuck on a problem, taking a break means you come back to your product with fresh eyes.

<comment><USER4> I couldn't have said this better myself. The more I made from my side project, the more it magnified everything I hated about my day job.</comment></comment>


The end of the OS is nigh - <AUTHOR> http://mybroadband.co.za/news/columns/32768-the-end-of-the-os-is-nigh.html

<comment><USER2> The only real thing that is required is functionality. And it will be most likely the only thing that will stand in time (among many other things that any given useful application might have). The author, the target platform, the product philosophy, and all the other little things are just attributes meaningful for enthusiasts (that goes away with time).</comment>


Aristotle's lisp, why Socrates loved dancing and other tales of ancient thinkers - <AUTHOR> https://www.washingtonpost.com/entertainment/books/aristotles-lisp-why-socrates-loved-dancing-and-other-tales-of-ancient-thinkers/2018/06/06/ece2fc44-64ff-11e8-a768-ed043e33f1dc_story.html <comment><USER2> Diogenes Laertius is a fun read, full of entertaining stories and....urban myths, probably most of which never happened. The article admits that then says "Did you know..." as if it's all fact.

By the way if you haven't, read Plutarch, who is vastly superior in every way, and taught history and practical wisdom to people for a thousand years, and goes on doing so.

</comment><comment><USER3> > Once when the philosopher was enjoying an especially fine afternoon, his > admirer Alexander the Great asked whether there was anything he could do for > him. Diogenes answered that the conqueror could move out of the way since he > was blocking the sun.

This is quite interesting. Upon deeper inspection, Diogenes asks from Alexander not to _deny_ him the Sun. Alexander being a conqueror, can make quite a few things... But Alexander cannot make sunshine, he can only _deny_ sunshine by standing in the way/killing/destroying.

I think Diogenes is teaching a lesson to Alexander.

<comment><USER4> If you want to learn more the History of Philosophy with any gaps podcast is fantastic. This[1] is the episode which discusses that meeting

[1]. [https://historyofphilosophy.net/cynics](https://historyofphilosophy.net/cynics)

<comment><USER5> Highly recommend History of Philosophy Without and Gaps podcast. It's fantastic, thorough, and makes no assumptions about the listener's background. My only regret, is that I expect it will take him 10 more years (at least) to finish the history. I don't want to wait that long!

<comment><USER6> Have you listened to the 'sibling' podcast on Eastern Philosophy? I've been meaning to check it out but haven't gotten to it yet. I did quite like History of Philosophy Without and Gaps, as far as I got anyways!

<comment><USER4> Do you mean the podcast on Indian Philosophy? I found it a bit harder to follow. I assume that is because the technical terms used by the Indian Philosophers were less familiar to me (i.e. veda, etc). Still I found it highly interesting.

</comment></comment></comment></comment></comment><comment><USER7> \--

<comment><USER8> Is δεν-είναι-διασκεδαστικό supposed to mean "defun"? That's a different kind of "fun" right there ("fun" as in "I had fun at the park" instead of "fun" as in "function").

<comment><USER3> It means "it's not fun".

</comment></comment></comment><comment><USER9> NOT lisp the language.

<comment><USER10> Yes. One of the classic Greek texts is "Structure and Interpretation of Computer Programs" by Aristotle.

<comment><USER9> Many would confuse a "lisp" to the language. It's HN anyway.

<comment><USER10> When I read the article title, I immediately thought of the language LISP as well. The idea made me chuckle though, so I commented.</comment></comment></comment></comment>


10 web trends that should die - article is from 2005 but could have been written today - <AUTHOR> http://blogoscoped.com/archive/2005-12-31-n34.html

<comment><USER2> The splitting an article into many pages has actually gotten worse since 2005. I personally find this incredibly annoying as it really disrupts the flow of reading.

Some of the worst culprits are technical review sites like Anandtech and Tom's Hardware where a single review will be split into 10 pages! Reuters is particularly bad too, and will split any article longer than a paragraph into multiple pages.

This is really page view whoring and should be called out as such.

</comment><comment><USER3> Some of these really sound nitpicky. The "Read More" links shorten a page so users can browse quickly through articles and see which ones they'd actually like to read. Sure, some sites don't need it, but its ok on other sites. Now, the splitting into multiple pages like NYT or Tom's Hardware, yeah thats annoying as hell.

If fonts are too small, your browser has a enlarge text function. Generally 8pt is small but OK and mostly readable. Any smaller (I doubt any site uses smaller) is a little un-userfriendly.

"Let's treat the mobile web as a separate entity." -- OK I take issue with this one. Of course you have to treat it as a separate entity. Have you ever tried to view "real" google on a Pocket PC? Its too big. The mobile version makes it easier to see. Same goes for many sites. Mobile versions of sites ARE functional.

"Let's care about low bandwidth!" -- Well I used to think it wasn't important, until I realized that AOL dial up service actually still exists....

"Let's read out loud the URL on TV." -- Most people won't go google some unknown site on their own. If the TV tells them to visit the site though, theres a better chance they might.

"Let's tell everyone Firefox is the better browser." -- Firefox 1 WAS more secure than IE6. Right now however, I think the difference between firefox and IE7 is negligible enough... so whatever.

Overall, I think this article was written with too narrow of a scope.

<comment><USER4> When I read come across links I open them in another tab, by the time I come around to read them, they have loaded long ago or they will not load at all.

</comment></comment><comment><USER5> 1\. "Our article is too long, let's split it up into many pages."

This annoyance has led me to immediately look for the "Print" link for every article. Incidentally, this has turned my desktop into a PDF dump of everything I read.

</comment><comment><USER6> "Let's have a tiny font that looks better."

I was amazed at the number of templates at CSS Zen Garden that use tiny fonts (I was recommended this site when I started to learn CSS design). More artistic maybe but certainly not functional.

<comment><USER7> A friend of mine recently discovered that his most lucrative customer base is age 50+. The next day he doubled all his font sizes!

</comment></comment><comment><USER8> 6\. "Let's do a traditional homepage for our company."

Not every web site needs to be a blog.

</comment><comment><USER9> Seeing at these are still "problems" after three years mean that a lot of people are doing them successfully.

<comment><USER10> or not reading the signs correctly.

<comment><USER11>
      In Web design
      here is a thing
      to keep in mind
      don't make things
      hard to find
      Burma-Shave

</comment></comment></comment><comment><USER12> You know, they're not splitting up articles because they think YOU like it better. YOU aren't paying them.

</comment><comment><USER13> ....and still only half of it would be good advice.</comment>


Is it possible to apply CSS to half of a character? - <AUTHOR> http://stackoverflow.com/q/23569441/449288 <comment><USER2> I've never seen such polished and thorough answers to a question like this. One answer (not even the accepted answer) made a plugin and a beautiful website to go along with it: [http://emisfera.github.io/Splitchar.js/](http://emisfera.github.io/Splitchar.js/)

Pretty amazing that our tools are getting so good that someone can quickly whip up an open-source plugin and splashy, hosted website for a SO answer.

<comment><USER3> How do people make sites this beautiful for a small plug in? Is there a framework, like Bootstrap 3 or something? How does it work?

<comment><USER4> This one in particular uses the jQuery onepage-scroll plugin [0] for the scrolling effects, prism.js [1] for code syntax highlighting and some plain HTML and CSS. Here's the complete code: [https://github.com/emisfera/Splitchar.js/tree/gh- pages](https://github.com/emisfera/Splitchar.js/tree/gh-pages).

In reference to some other comments on this thread, this isn't built using Jekyll. GitHub pages supports pure static sites and Jekyll-powered sites if you put either on the gh-pages branch of the repository.

[0] [https://github.com/peachananr/onepage- scroll](https://github.com/peachananr/onepage-scroll) [1] [http://prismjs.com/](http://prismjs.com/)

<comment><USER5> I didn't even realize it scrolled until I saw your comment and went back.

<comment><USER6> Hiding your content below the scroll and having a single, tiny, ambiguous, low-contrast visual indicator that more information is below seems to be "the in thing" in web design in 2014.

</comment></comment></comment></comment></comment><comment><USER7> I wonder if this designer is the one behind the recently unveiled 'Halifax' logo? The X looks remarkably similar.

Link for visual evidence: [https://twitter.com/PaulRPalmeter/status/456165443363827712/...](https://twitter.com/PaulRPalmeter/status/456165443363827712/photo/1)

<comment><USER8> From the comments on the question, it's actually for a joke/complaint about the cost of that very logo: [http://pvp.comeze.com/brandgenerator/](http://pvp.comeze.com/brandgenerator/) (type in Halifax and it shows a message about the cost).

It would be pretty funny if the libraries made to help out this joke end up being used for official uses of the logo, but at present the logo's only rendered inside an image at the official branding site, [http://halifaxdefined.ca/#new-logo](http://halifaxdefined.ca/#new-logo)

</comment></comment><comment><USER9> The 'why' should not matter. Who really cares whether it should be done? or why they would want to do it?

If someone has an interesting problem, let's try and figure out a way to do it. Usually the why comes up along the way, but not relevant.

Thankfully, some great folks stepped in and gave quality responses.

<comment><USER10> "To see if I could" is a perfectly valid reason. But "to create a logo" probably isn't in a case like this. CSS can do so many cool things, and I love seeing crazy stuff that pushes the limits ([http://attasi.com/labs/picsselz/](http://attasi.com/labs/picsselz/)). But it's also important to know when just using an SVG image, or maybe doing something in canvas is the right solution.

</comment></comment><comment><USER11> That's cheating :) CSS is applied to the whole character.. I'm sure that you can avoid javascript by using content:attr(letter) in before and after. like

<comment><USER12> If you're sure that it can be done without javascript, adding your solution as an answer on the SO question would probably be greatly appreciated.

<comment><USER13> That is the exact technique that is used in the accepted answer. It does appear that the answer was recently edited though so perhaps these comments were made before that.

</comment></comment></comment><comment><USER14> Those are some imaginative solutions. One problem[1] with drawing over half the character is anti-alias. The border gets a blend of both colors.

[1] [http://i.imgur.com/5KspGyc.png](http://i.imgur.com/5KspGyc.png)

<comment><USER15> I'd say do the same thing with the "after" selector, display only the other half, hide the original character, and that should take care of that.

</comment></comment><comment><USER16> [http://jsfiddle.net/CL82F/14/](http://jsfiddle.net/CL82F/14/) did it with just CSS pseudoselectors

<comment><USER17> The background of the underlying element is still showing through, messing up the antialiasing and subpixel smoothing.

<comment><USER18> looks correct on latest firefox. what browser are you using?

</comment></comment></comment><comment><USER19> So this is just the ::before pseudo-element? I feel like I'm missing something.

<comment><USER20> .halfStyle:before includes positioning like: "position:absolute; top: 0; left:0;" which puts the :before element on top of the existing element.

"width: 50%" says it's only half as wide.

The possibly fancy thing being used here is the use of "attr(data-content)" which use the data-content attribute of the element to fill the pseudo- element's content.

</comment></comment><comment><USER21> And now apply it to half a character diagonally. :-)

<comment><USER22> [http://jsfiddle.net/pbhj/X53Ju/](http://jsfiddle.net/pbhj/X53Ju/) works but only with -webkit as background-clip text isn't supported elsewhere (for shame).

Or, using lettering.js to wrap individual letters in spans - [http://jsfiddle.net/pbhj/3P7eU/](http://jsfiddle.net/pbhj/3P7eU/).

Edit: here's a polyfill that might help, [https://github.com/TimPietrusky/background-clip-text- polyfil...](https://github.com/TimPietrusky/background-clip-text-polyfill).

<comment><USER23> I don't know why, but I felt compelled to make it spin. [http://jsfiddle.net/X53Ju/7/](http://jsfiddle.net/X53Ju/7/)

</comment></comment></comment><comment><USER24> relevant code snip:

      .halfStyle:before {
        width: 50%;
        color: #f00;
      }

<comment><USER25>
      content: attr(data-content);

This is pretty interesting, too.

</comment></comment><comment><USER26> Not looking forward to when this catches on.

</comment><comment><USER27> It's cool seeing the solution for this, but I never would have imagined such a random request.

Now, go make striped characters.

<comment><USER28> Striped? What about checkered? [http://jsfiddle.net/F3KAc/5/](http://jsfiddle.net/F3KAc/5/)

<comment><USER27> Excellent work. Make that your next interview question.

</comment></comment></comment><comment><USER29> My eyes hurt just seeing these examples. I hope such technique will not get much attention outside of SO and HN.

</comment><comment><USER30> thinking of a ton of new usage cases for this example. would be nice to see this implemented in pure CSS in the next revision perhaps. is that even possible?

</comment><comment><USER31> yes, but why?

</comment><comment><USER32> It's sad to see that this kind of questions gather so much attention, and other questions closer to the real world receive NONE. StackOverflow has reached his max hipster level.

<comment><USER33> I'm as much a "real / big problems" guy as anyone. But I don't begrudge this.

If you feel there's something missing from HN, how about posting some submissions. I see you've got ... none.

Remember, if you're not part of the solution, you're part of the precipitate.

<comment><USER32> I've posted plenty of questions in StackOverflow that have gone unanswered, some of them (in my opinion) pretty important. For instance, my last question has turned out to be a bug in Django. They however have no place here in HN because this is not that kind of site.

Anyways, everyone knows that the quality of the answers in SO has declined a lot in the last few years. It's not something strange.

<comment><USER33> What's your SO username?

</comment></comment></comment></comment><comment><USER34> Just because you can do something...

<comment><USER35> It's more "Just because the solution isn't obvious or it wasn't designed with something in mind"... People that push tools past their limits with clever tricks can be very helpful, or very annoying.

</comment></comment><comment><USER36> This looks repugnant. Just because it can be done, doesn't mean you should do it! :-)

<comment><USER37> So, should we make it blink?

<comment><USER38> No, you should make _half_ of it blink.

<comment><USER39> [http://jsfiddle.net/pd9yB/160/](http://jsfiddle.net/pd9yB/160/) I am not proud of myself :)

Edit: [http://jsfiddle.net/pd9yB/238/](http://jsfiddle.net/pd9yB/238/) should work in Chrome/FF/IE/Opera and most modern browsers (previous link is Webkit- browsers only)

<comment><USER40> I tried that first but it didn't work in Firefox :\

<comment><USER39> Try the new link (see my edited comment).</comment></comment></comment></comment></comment></comment>


Show HN: HugoBot – An integrated scratchpad for PHP - <AUTHOR> https://hugobot.io/ <comment><AUTHOR> Hey guys,

Zeeshan from HugoBot here. Most of my time while I am prototyping something, working on some project or just want to tinker with some snippet to see the output, I had to go through the hassle of saving the script, opening my terminal and running the code from there which was a little time taking and annoying if you have to do that a lot. So I came up with this idea to build an extension for VS Code that can run my PHP code on the go and show me the output right beside my code without ever having to leave the editor. Hugobot allows me to run my code and see the output right beside the code, all I have to do is just hit some keystrokes and the output will be shown.

I have been working on the product for the past couple of weeks and I am excited to share it with you all. I would love for you to take it for a test drive and leave your comments, feedback, feature requests and questions here. Happy to answer any questions that you might have.

PS. the extension is only available for VS Code currently, but our team is working hard to make it available for the other editors and IDEs - you will soon be able to use it on Sublime Text and IntelliJ. Stay tuned!

Thanks</comment>


Facebook's new 'early bird' spy tool is just the tip of the iceberg - <AUTHOR> https://thenextweb.com/insider/2017/08/10/facebooks-new-early-bird-spy-tool-is-just-the-tip-of-the-iceberg/#.tnw_DtbFg2DS <comment><USER2> Identifying and squashing potential threats has been part of Facebook's playbook from the very early days. It's not surprising at all that they have developed internal tools and systems to formalize the process and make it more efficient.</comment>


Should I file a lawsuit against my former employer? - <AUTHOR> https://gist.github.com/anonymous/7570950

<comment><USER2> You should speak to an attorney.</comment>


Drug-Taking AI's - <AUTHOR> http://pastebin.ca/1741950

<comment><AUTHOR> <http://ansistego.sf.net/stickotropes.tgz> drug-adapted animals to try. use doses of 500 or so but i am about to go to 750. zow!</comment>


Show HN:A Discussion Site for (Pilot)Hindu-Religious Groups Based on Hacker News - <AUTHOR> https://hindumediawiki.com <comment><USER2> I don't understand, I only see one religion (Hinduism) being discussed, how is it a discussion site for religious groups?

<comment><AUTHOR> Its an pilot with one religion , we will make it open for all other religions

<comment><USER2> I mentioned about the title because at the bottom of your website it says: "Hindu Media Wiki is a Resource sharing and discussion site for followers of the Hindu religion and those interested in learning more about Hinduism." This would be a better title in my opinion, regardless the idea you have for all religions is a nice one.

<comment><AUTHOR> Thanks, yes it would be a good title which I missed it.

</comment></comment></comment></comment><comment><USER3> You might also want to look for potential inspiration at the religious discussion sites at Stack Exchange.

[https://judaism.stackexchange.com/](https://judaism.stackexchange.com/)

[https://christianity.stackexchange.com/](https://christianity.stackexchange.com/)

<comment><USER4> There's also already [https://hinduism.stackexchange.com/](https://hinduism.stackexchange.com/)

<comment><USER3> Hmmm, it looks like the new site's disclaimer is copied directly from this page, even including the same capitalization!

</comment></comment></comment><comment><USER5> Why have Media Wiki in the name if you aren't actually using MediaWiki?

<comment><AUTHOR> Actually this site is dedicated to share the existing media and to allow users to discuss that media. Kind of meta media so we kept as media wiki.

</comment></comment><comment><AUTHOR> Also we are so much stuck in solving chicken egg problem of content here , can anyone share the early days of hackernews? like how it started growing?

<comment><USER6> I vaguely remember a mildly cultish obsession with lisp and PG.

<comment><AUTHOR> I get it, power users must be having cultish obsession around the topics, m sensing some parallel directions

</comment></comment></comment><comment><AUTHOR> A discussion site for various religious groups inspired from the design of hacker news.

People may like this techi flavour in design in otherewide very shiny and colour rich websites of religious content. Suggest your views :)

</comment><comment><USER7> This is quite cool! What's the focus on this site vs. r/Hinduism and other such subreddits?

<comment><AUTHOR> actually r/Hinduism is not focused on strict discussion based on scripture also there are many kind of media formate involved like images,videos etc, for example religious groups have many rules and hierarchy based on scriptures to decide the quality of posts which is not found in r/Hinduism.

<comment><USER8> What sort of hierarchy?

<comment><AUTHOR> so thats why we started with the category tree itself.

instead of flat tags, that's one visual difference

</comment></comment></comment></comment><comment><USER9> Is this a open source version you can download and use yourself ? How was this built ?

<comment><AUTHOR> There is one php version of hackernews which we have used to start but there were many changes done to suit the needs.

You can check the php version here [https://github.com/Kandepet/HackerNews](https://github.com/Kandepet/HackerNews)

</comment></comment><comment><USER10> can users of other than Buddhism religion customize "karma" into something else, like probably "mitzvah" for Judaism or whatever is used for sin/virtue credit maintenance in Christianity?

<comment><AUTHOR> Thats very fine idea, will do it for sure

</comment></comment><comment><USER11> Will this be open sourced?

<comment><AUTHOR> we are planning to do so once we come up with a suitable alternative wiki design, currently working on stable production for the forum first.</comment></comment>


Apple hid a Lightning connector for debugging in the Apple TV 4K's ethernet port - <AUTHOR> https://9to5mac.com/2019/10/17/apple-tv-4k-lightning-port/ <comment><USER2> I mean I know it's been a while since the device had been released, but what was Apple expecting? People wouldn't find it?

I'm just sick of seeing stuff like this. They invested at least tens of thousands of dollars to develop a custom component like this for the obvious purpose of keeping power users out. To me, this is another case of Apple not caring at all about their customers.

I remember the days of the iPod where users could flash their own firmware to the device they purchased. I remember not liking some features they added to the iPod OS and being able to downgrade to retain old features. I understand the desire to dumb things down for your average user. I understand wanting to provide quality software alongside your hardware. What I don't understand is why do I not own the hardware I purchase? If I flash my own firmware, do what you want. Block me from downloading new updates, remove my access to any Apple-provided content. I don't care, just let me load up what software I want.

This is why people were mad at Sony in the PS3 days. Maybe I'm rambling. Just put a diagnostic port in the device and save some engineering money that would be better invested in cooling your laptops or providing a standard, widely adopted port like USB C in your phones. Don't focus on the things that will just detract users from your platform.

<comment><USER3> Apple hid this to prevent users from plugging something into it, and then calling AppleCare when nothing happens. Non-functional ports are a bad thing.

<comment><USER4> Tell that to TV STB manufacturers…

</comment></comment></comment><comment><USER5> Some routers hide serial port pins in Ethernet ports. [https://forum.dd- wrt.com/phpBB2/viewtopic.php?t=62998](https://forum.dd- wrt.com/phpBB2/viewtopic.php?t=62998)</comment>


In Venezuela, Russia pockets key energy assets in exchange for cash bailouts - <AUTHOR> https://www.washingtonpost.com/world/national-security/in-venezuela-russia-pockets-key-energy-assets-in-exchange-for-cash-bailouts/2018/12/20/da458db6-f403-11e8-80d0-f7e1948d55f4_story.html <comment><USER2> I don't see Venezuela defaulting or "nationalizing" these assets as easily as they did others... Let Maduro try...

</comment><comment><USER3> Isn't it fair? Fairer than invading an oil country like Iraq or Libya, to me anyway.

<comment><AUTHOR> I agree, it's relatively fairer</comment></comment>


The Perils of Peak Attention - <AUTHOR> https://newrepublic.com/article/137107/perils-peak-attention <comment><USER2> I've been experimenting with using my phone as little as possible. When I'm out, I put it in my backpack or pocket on silent. At the very most, I'll use it for music. I try really hard to not pull it out to check HN or others when I'm bored. I also now check Twitter at most twice a week, for less than twenty minutes.

It's too early to be confident in the results, but I do feel more "peaceful" and able to focus, if that makes sense. I'm trying to extend this to my computer and not get distracted by opening up new tabs every time I get a break from thinking or coding.

For those interested, the inspiration for this experiment was Cal Newport's book "Deep Work".

</comment><comment><USER3> The chief concern I have about being "submerged under the waves" of the 'net, as this article puts it, is that we will lose the lone creative genius.

Hard to have a lot of truly original thoughts when you spend every waking moment chatting with someone, instagramming everything you experience etc.

Design by committee is frequently inferior to having one expert with a strong vision sit down in relative isolation and create. But it's getting harder and harder to be isolated. We're raising an entire generation that doesn't even understand the virtue of that concept.

</comment><comment><USER4> In a world where your Rushkoffs[1] go unread, we are spiraling into some sort of local maxima where social media is realized for what it is, and the problems associated with social media are epidemic.

The crux of the issue lies in the fact that nobody knows what social media is, or indeed cyber. "Cyber" as it stands now is some far off place, in a William Gibson fantasy, but infact operates in the world seemingly un-noticed by the smartphone equipped masses.

As I said; it's not long until people realize they've been played and their eyeball hours and data exhausts are being sold to the highest bidder for hard cash. It makes me wonder why smartphones even cost so much. Surely they should be 'free' given how much data can be gleaned from a smartphone owner?

[1] [https://en.wikipedia.org/wiki/Douglas_Rushkoff](https://en.wikipedia.org/wiki/Douglas_Rushkoff)

</comment><comment><USER5> Great read. I often compensate in life by turning up the intensity, finding new things to interest me, etc. So, it's refreshing to hear a justification for learning to enjoy moments of thoughtlessness and solitude when they come about.

<comment><USER6> Agreed. It's refreshing to read a justification to learn to enjoy such moments.

This is especially true in a society that tends to only place value on thoughts that directly lead to tangible means of moving forward. Sometimes, however, these moments of thoughtlessness can complement the aforementioned moments of intensity. This combination can actually lead to an overall net gain in achieving ones goals, whatever they may be.

A tough concept for the prototypical Type A personality to grapple with, no doubt. But something that is worth pondering.</comment></comment>


Tool to send emails with dynamically generated attachments(responly.com) - <AUTHOR> Responly let's you create and send bills, invoices, reminders, payslips or automate any business letter with dynamically generated content to multiple recipient instantly <comment><AUTHOR> I'm using merge tags to populate values dynamically in fields. You can create any letters which will be attached to an email that you are going to send.</comment>


Ask HN: How to choose a certain GNU/Linux distro? - <AUTHOR> I have been using different flavors of Linux since the past 5 or 6 years.
I tried switching between Ubuntu, Mint, Debian, Arch, Manjaro, etc.. while keeping the same Desktop Environment for familiarity reasons.
I have yet to find a reason to get attached to one flavor over the others.
As a laptop user how do you choose which distribution to use (beside out-of-the-box hardware compatibility) ? <comment><USER2> Some factors for choice:

\- security policy: how are notifications handled and what's the normal timeframe for published update (RH and Ubuntu have upper hand here because they will often get embargoed early notifications)

\- rolling update / stable snapshots: do you prefer to deal with a big upgrade breakage ~once a year, or small ones potentially at any point?

\- source or binary packages?

\- what security options are integrated? (RH-based: selinux, ubuntu-based: apparmor, gentoo: grsec/selinux)

\- a year ago I'd say systemd/sanity, but Arch adopted systemd and there are no big linux distributions without it anymore

\- team behind the project - is it only a handful of people dealing with issues when they have time, or are they paid enough to work on the weekend if something terrible happens?

\- kernel - are you getting extra patches for critical issues, or completely new versions in updates?

\- foss - do you care about splitting software into free/non-free repositories (debian does it)

The rest is gravy. There's not much real difference between systems after that.

My choice: Arch for home (CVEs monitored, rolling update, binary packages, tomoyo lsm, big team, new kernels, don't care about foss split), Ubuntu for work (security team with quick respose, stable snapshots, apparmor lsm, big team, kernel patches, kind-of-foss-split).

<comment><AUTHOR> I went with Arch for over a year, and 'pacman -Syu' was one of my biggest fears, as when rebooting I didn't know what package was going to get messed up.

How did you work around that ?

<comment><USER2> Watch out for notices during the upgrade. Check the forums if anything warns/fails.

So far I only ran into one issue over 2 years, so it's not bad. But otherwise, all the data I have is backed up, so I don't mind restoring the system from scratch if everything fails.

Or to put it more bluntly: if you're afraid of upgrades, that's a good sign you should fix your backup strategy.

</comment></comment></comment><comment><USER3> Pick one that works for you* and plays nice with your hardware. Make sure it has a very good package manager.

I like Debian with mate myself (never tried arch, but i use their tutorials a lot). Apt-get works, has almost everything I need and there is a large user base.

Ubuntu peevs me off trying to be so flashy. But I tap into the know how of their user base often.

* works for you means that you don't spend your days trying to figure stupid things out, or you battle buggy GUIs. Whatever it is you do on a computer the district/environment is a tool, not the end goal.

<comment><AUTHOR> > the district/environment is a tool, not the end goal

I went off Arch/Manjaro due to this. Keeping the system working smoothly after every single change was too much work. I guess I'll be sticking to Mint with Mate after all.</comment></comment>


Science Explains Why It Hurts So Much To Get Hit In The Balls - <AUTHOR> http://www.businessinsider.com/a-scientific-explanation-for-why-getting-hit-in-the-testicles-hurts-so-much-2012-7

<comment> orz-fi That text hardly explains the "why"...

The real answer is evolutionary: reproductive facilities are The Most Important Thing in a Darwinian organism's collection of organs. Everything else is just auxiliary support machinery. That is why evolution probably favored animals like us who are very sensitive about the balls.</comment>


Code Triage – makes it easy to contribute to open source - <AUTHOR> http://www.codetriage.com/

<comment><AUTHOR> I only recently learned about this site, but I can tell already it's going to be an important channel through which I'm able to contribute to open source projects.</comment>


Rich Chinese want to buy happiness by emigrating - <AUTHOR> http://www.latimes.com/news/nationworld/world/la-fg-china-emigration-20121102,0,7989771.story

<comment><USER2> quote: _The big disadvantage of the U.S. program from the standpoint of Chinese investors, said Du, is that their immigration status is contingent on the business succeeding. "If the business fails, you lose your green card too."_</comment>


Mozilla in 2013 - <AUTHOR> https://blog.mozilla.org/blog/2013/12/16/mozilla-in-2013/ <comment><USER2> I'm really surprised by the naysayers in this thread. Mozilla is a not-for- profit. The largest and most influential when it comes to action on the web given their footprint directly in-front of the users.

You're complaining about lack of some edge-css features, silly bugs that have been open for a long time, and the fact that they may be chasing down some avenues that yield little fruit.

But, the web I envision without them is one that I do not want any part of. While I switched and used Chrome (for the tools), lately, the only browser vendor that I trust is Mozilla. I switched back to FF, donated, and decided to start dipping into their code/docs to see if I can help out.

While certainly not perfect, they are the company that we should be supporting. Not necessarily financially, but by being advocates, code/doc junkies and designers.

Here's to Mozilla and here's to 2014. Congrats!

<comment><USER3> Agreed. Mozilla, Wikipedia and the Internet Archive keep alive the Web as it used to be, before getting commodified.

</comment></comment><comment><USER4> Reading this post I wanted to buy a tee-shirt or two because I like Firefox and wanted to help them a bit (and help them alleviate their dependancy on Google's $$) but I was unable to find a page with Mozilla products... It's a shame because I think people would love to contribute by buying a goodie or something. I know I still can donate money but maybe I'm a bit selfish but I find it not to be as fun as getting something in return.

<comment><USER5> I wanted to give 3$ to Firefox but their form for submitting credit cards is weird and it needs my address for some reason?! Anyway the address was wrong and I can't be really bothered to try all the addresses I used in previous 4 years.

If GoG doesn't need my address why would Mozilla? And further more why should it complain about wrong address.

<comment> vertex-four GoG doesn't, and a couple of other high-profile sites don't (Amazon for example), but the vast, vast majority of card payment forms on the Internet require a full address as for fraud prevention. Do you not often buy things on the Internet?

<comment><USER5> I do buy things often using GoG, or Amazon, or Kickstarter or PayPal. I've never had to enter my address before.

Hell, smaller companies asked for address but never checked it against my CC info (which is outdated anyway). I never had to enter the correct address for one of them.

I want to donate, but this form just bounces me I've so far tried at least 10 different combinations. I have no idea what bank entered as its information.

<comment> vertex-four PayPal definitely asks for a full address when you sign up or pay by card directly. And I don't know about Kickstarter, but I just checked Indiegogo which I regularly use, and they require a full address for billing.

My understanding of the system is that usually the address can be wrong so long as your card/connection/purchase/etc doesn't look suspicious, but different payment processors have different fraud profiles, so some might pay more attention to the address than others.

<comment><USER5> Well used PayPal as payment option. Seems to be the easiest.

</comment></comment></comment></comment></comment></comment><comment><USER6> I went to the Mozilla Festival in London this year and was amazed at just how much does Mozilla does. They're very far from just a browser manufacturer.

</comment><comment><USER7> Keep up the good work with asm.js! It would be nice to see more apps developed in C++ for web in 2014.

</comment><comment><USER8> >In 2013 we launched Firefox OS , the first open Web devices based entirely in Web technologies

This early sentence really derailed me. There is so much going on:

-What is an "open web device", what qualifies? Maybe put a link here?

-Why is Firefox OS called an OS if it is actually devices?

-Is being based IN web technologies the same as being based ON web technologies?

-And there is a weird implication here that there have been open web devices NOT based on web technologies but now we have open web devices that actually ARE based on web technologies. That can't be right, can it?

From what I can tell the sentence should read something like, "In 2013 we launched Firefox OS, the first [mobile?] operating system based entirely on Web technologies."

<comment><USER9> My interpretation:

"Web device" implies a device that allows browsing the web (such as a smartphone or tablet). "open" implies that it is open source to some extent (similar to Android).

"based entirely on web technologies" differentiates it from Android in that all apps are web apps and use standardized web APIs to access the hardware rather than having native apps that use proprietary APIs.

It does seem weird that the sentence use the term "OS" to describe devices, though.

</comment></comment><comment><USER10> I would really love to see Mozilla team up (and/or buy) DuckDuckGo. Not only for a better search experience, but it would just be great to see Mozilla sever its ties with Google - a company who seems blatantly at odds with the very principals of trust, privacy, and transparency that Mozilla is boasting here.

<comment><USER11> According to Wikipedia[1] over 80-90% (or $163 million in 2011) of Mozilla's funding comes from Google. I'd love to see Mozilla be more independent from Google, but I don't think they're going anywhere without them anytime soon.

[1] [https://en.wikipedia.org/wiki/Mozilla_Corporation#Google](https://en.wikipedia.org/wiki/Mozilla_Corporation#Google)

</comment></comment><comment><USER12> I thought about and had to work with Mozilla today. "Seven years have passed without this bug being fixed." [https://bugzilla.mozilla.org/show_bug.cgi?id=349259](https://bugzilla.mozilla.org/show_bug.cgi?id=349259)

<comment><USER13> You can always submit a patch, remember that the source is Open, and everyone is welcome to contribute.

My cringe with Firefox are misfeatures like window.onbeforeunload. They deliberately break the expected behavior due to an unreasonable decision, but no browser is perfect.

<comment><USER14> That patch would not be welcome. The patch to make the behavior intuitive is literally to remove "!important" from one CSS file. They're not changing because they're afraid to break the web.

<comment><USER15> > They're afraid to break the web.

They tried a fix and it broke YouTube. So it seems like a reasonable fear. [https://bugzilla.mozilla.org/show_bug.cgi?id=349259#c54](https://bugzilla.mozilla.org/show_bug.cgi?id=349259#c54)

> The patch ... is literally to remove "!important" from one CSS file

It isn't a simple one line fix, as Firefox developer kindly explained. [https://bugzilla.mozilla.org/show_bug.cgi?id=349259#c76](https://bugzilla.mozilla.org/show_bug.cgi?id=349259#c76)

>That patch would not be welcome.

They describe what work would be required (and where the changes would likely be) for the patch to be accepted in the bug. [https://bugzilla.mozilla.org/show_bug.cgi?id=349259#c80](https://bugzilla.mozilla.org/show_bug.cgi?id=349259#c80)

<comment><USER14> It's a one-line fix to make it intuitive, but that's not what's needed here. Ultimately there should be some spec so that browser vendors can converge towards a single behavior.

</comment></comment></comment></comment></comment><comment><USER16> [http://imgs.xkcd.com/comics/perspective.png](http://imgs.xkcd.com/comics/perspective.png)

</comment><comment><USER17> Wishes for Mozilla in 2014:

-Accept cryptocurrency donations; -Break free from Google/surveilance as default search; -DDGo as default search; -Firefox OS becomes as adopted as iOS and Android; -Firefox browser regain market share back from Chrome/surveillance.

</comment><comment><USER18> Mozilla also recently helped Eloquent JavaScript 2nd edition reach its funding goal: [https://eloquentjavascript.net/2nd_edition/donors.html](https://eloquentjavascript.net/2nd_edition/donors.html)

</comment><comment><USER19> No mention of Fira? This is a great font! Thanks Mozilla! [https://github.com/mozilla/Fira](https://github.com/mozilla/Fira)

</comment><comment><USER20> I am happy ..But I want you people better than chrome in all terms.You are guys doing well but you need to do hardwork..

</comment><comment><USER21> In the mean time, everyone just want a better browser.

<comment><USER22> Really? The last time I've thought to myself "gee, my browser is missing a feature I'd _really like_ " or "all my browser needs to get better is (some improvement)" was... 2008? 2009? I'm not sure, I just know it's been a while.

And it doesn't really matter what browser I was using at the time. Chrome, Firefox, even Safari.

What do you want to make your browser better?

<comment><USER23> css grid support, flex-wrap support

<comment><AUTHOR> flex-wrap is in Nightly, CSS Grids don't have a stable spec yet.

<comment><USER23> That's awesome about flex-wrap! I have been waiting a long time.

> stable spec

I'd really like to see more vendor prefixes for support. I mean, basic flexbox support was rolled out quickly, and the spec changed like three times. Mozilla has a new 'avoid vendor prefixes' thing, which I think is the wrong approach. I'd rather just use a tool like autoprefixer to generate all of the browser- incompatible CSS until we can all agree.

I can't believe I am praising IE for being forward thinking! (they have full CSS grid support, per the draft)

<comment><AUTHOR> I believe MS came up with the grid spec, or at least the original draft editors were three MS employees and glazou: [http://www.w3.org/TR/2011/WD- css3-grid-layout-20110407/](http://www.w3.org/TR/2011/WD-css3-grid- layout-20110407/) . This was published five days before the first platform preview of IE10.

It does seem like a neat spec though, I'd welcome inclusion as another tool in the box.

<comment><USER24> We (Bloomberg) hired Igalia to help put some resources on implementing CSS Grid. The original MS authors didn't like the initial spec so they've been working on an improved spec w/ others (Google, Igalia) and Igalia is landing code for it in both WebKit and Blink. So it is definitely moving forward..

</comment></comment></comment></comment></comment></comment></comment><comment><USER25> This really resonates with me: "Mozilla is dedicated to offering users privacy and transparency and we are honored to be an organization that users trust."

Thank god for Mozilla, they are one of the few tech companies I still trust in these troubled times.

I like to think if the NSA asked for direct access to their servers (such as Google were revealed to have granted), Mozilla would have no shortage of whistle-blowers.

<comment><USER26> I thought the way the NSA got direct access to Google's servers was by running taps into Google fiber optics?

<comment><USER25> That's what Google tried to claim once Snowden forced their hand, but the leaked PRISM documents contradict their official stance. I know which I choose to believe.

<comment><USER27> > but the leaked PRISM documents contradict their official stance.

Mind posting a source confirming this? It's just that I don't believe you is all.

<comment><USER25> [http://www.theguardian.com/world/2013/jun/06/us-tech- giants-...](http://www.theguardian.com/world/2013/jun/06/us-tech-giants-nsa- data)

There are a lot of Google employees on HN who try to suppress information whenever anyone posts sources. Pretty pitiful.

"Although the presentation claims the program is run with the assistance of the companies, all those who responded to a Guardian request for comment on Thursday denied knowledge of any such program."

The PR response from Google is irrelevant, just attempting a cover up.

<comment><USER15> So you come to a conclusion and then ignore any contradictory evidence, because it all must be part of the conspiracy.

Seems level-headed and reasonable.

</comment></comment></comment></comment></comment></comment><comment><USER28> Implement CSS grid already</comment>


Amputee Barred From Olympics (prosthetics are getting good) - <AUTHOR> http://www.nytimes.com/aponline/sports/AP-OLY-RUN-IAAF-Pistorius.html?_r=1&hp&oref=slogin

<comment><USER2> And I'm not allowed to compete in the marathon using roller-blades. The reason this is a story is that he is perceived to be a victim.

I'm psyched he's running that fast though. For a while I really wanted to work in prosthetics. Would be satisfying...

</comment><comment><USER3> The amputee wasn't barred from the olympics. This particular set of prosthetics was banned.

That guy can still run in the olympics with _any other_ set of prosthetic legs but this one. It was just deemed that these gave him too much of an unfair advantage.

</comment><comment><USER4> I wonder where this would have lead had he been allowed to compete - and won.

Professional athletes are already crippling there bodies with drugs. Would someone have deliberately and literaly crippled himself to get an edge (i.e. prosthetics)?

Professional sports make me sick. They are selling their body. I do have more understanding for prostitution than this.

(Nothing against double-amputee sprinter Oscar Pistorius - he just games the system - he surely did not set out to lose his legs in the first place.)

</comment><comment><USER5> What next? Are they going to ban guys who take steroids from playing in the MLB?

</comment><comment><USER6> <http://news.ycombinator.com/item?id=98193>

<comment><USER4> Perhaps you had just bad timing, bad luck - or you should learn to write better titles?</comment></comment>


Args.js – Optional and Default parameters for JavaScript - adam-a http://autographer.github.io/args.js/

<comment><AUTHOR> Big caveat: this doesn't work in strict mode.

[https://developer.mozilla.org/en- US/docs/Web/JavaScript/Refe...](https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference/Functions_and_function_scope/Strict_mode/Transitioning_to_strict_mode#Poisoned_arguments_and_function_properties)

<comment><USER2> Just comment out the line that uses caller and always pass your arguments.

<comment> adam-a I was unaware of the strict mode problem. I never use it myself, probably because I'm not developing for the web, but a browser embedded in a desktop app.

I will have a look at providing a version that works in strict mode.

<comment> adam-a I have just updated to remove the Function.caller and added a strict mode declaration.

<comment><AUTHOR> Awesome! I am definitely going to use this now. Been looking for something like this for a while.

</comment></comment></comment></comment></comment><comment><USER3> I've seen this style of library come up quite a few times whilst hacking away in JavaScript where developers try to introduce a sense of strict typing (I even wrote a similar one myself when I first moved over from ActionScript). In the end I learned to stop worrying and love the <strike>bomb</strike> duck typing[0].

For me; one of the "joys" of coding JavaScript is the expressiveness that comes with a dynamic languages; should you throw an ArgumentError when your function that expects a number is invoked with a String? Maybe - sure it can help catch problems early and effectively "stop-the-line" in your public API, but then again it will probably end up throwing the classic `TypeError: Object foo has no method 'bar'` for you anyway.

For "public" methods which form part of an API (especially when that API is going to be shared outside of my team) I try to make my functions handle failure early (before they delegate off to the "private" internal methods), even better if the public methods can repair any unexpected usage, ie:

      function convertToHex(value) {
        var result;

        if (typeof value !== "number") {
          result = convertToHex(parseInt(value, 10));
        }
        else {
          result = "0x" + value.toString(16);
        }

        return result;
      }

Also, with regards to default argument values, I've always felt the "native" JavaScript approach was fairly compact and descriptive when required:

      function doFoo(bar) {
        bar = (bar !== undefined) ? bar : "default_value";
      }

[0] [http://en.wikipedia.org/wiki/Duck_typing](http://en.wikipedia.org/wiki/Duck_typing)

<comment><USER4> Why using :

        function doFoo(bar) {
          bar = (bar !== undefined) ? bar : "default_value";
        }

Over :

        function doFoo(bar) {
          bar = bar || "default_value";
        }

Coercion avoidance ?

<comment><USER5> 0 is falsy in javascript; with the second method, default_value will get used instead.

<comment><USER6> I'd use:

      bar = bar != null ? bar : 'default';

</comment></comment></comment></comment><comment><USER7> 'Args.caller.arguments' gives me the willies. That's a non-standardized extension combined with a deprecated one [0][1]. I'd have to be itching quite a lot to scratch it like this.

0 - [https://developer.mozilla.org/en- US/docs/Web/JavaScript/Refe...](https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference/Global_Objects/Function/caller)

1 - [https://developer.mozilla.org/en- US/docs/Web/JavaScript/Refe...](https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference/Global_Objects/Function/arguments)

<comment><USER8> Is there an alternative that provides the same functionality?

<comment><USER7> Not cleanly. You have to pass the arguments in explicitly, and you also need to convert them to an array (the arguments object is not an array [only array- like] and it's not supposed to escape its function body). So you need to do:

var args = Args([ ... defs ... ], Array.prototype.slice.call(arguments));

<comment> adam-a I have just updated the code to remove the Function.caller.arguments part, this means you have to pass through the arguments variable manually.

The arguments object is not a real array, this is true, but it has a length and is indexable, so Args.js still works ok.

I have seen on MDN[0]:

> The arguments object is available only within a function body. Attempting to > access the arguments object outside a function declaration results in an > error.

It doesn't actually cause an error though, so am I misreading that? Besides, by that definition passing arguments to Array.prototype.slice.call() is also a no-no.

[0] [https://developer.mozilla.org/en- US/docs/Web/JavaScript/Refe...](https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference/Functions_and_function_scope/arguments)

<comment><USER7> The ES5 spec specifically allows (but doesn't require) implementations to create an Array.prototype.slice that accepts 'arguments':

> NOTE: The slice function is intentionally generic; it does not require that > its this value be an Array object. Therefore it can be transferred to other > kinds of objects for use as a method. _Whether the slice function can be > applied successfully to a host object [ed: 'arguments' is one such] is > implementation-dependent._ [0]

'arguments' isn't just array-like. It's got some very weird behavior. For instance, if your function also has named parameters, and you set an index on the arguments object that corresponds with a parameter, then it changes the value of the local parameter as well.

0 - [http://es5.github.io/#x126.96.36.199](http://es5.github.io/#x184.108.40.206)

</comment></comment></comment></comment></comment><comment><USER9> Appears to use Function.caller ( [https://developer.mozilla.org/en- US/docs/Web/JavaScript/Refe...](https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference/Global_Objects/Function/caller) )

"Non-standard This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future."

<comment><USER10> It seems like you can avoid using Function.caller by suppling Args.js with the arguments yourself, like

Args([/* argument definition */], arguments);

<comment> adam-a That's right. The Function.caller bit was only added in quite late and the library works just as well without it, although you have to type a bit more.

</comment></comment></comment><comment><USER11> Wouldn't sweet.js and a macro make a more eye appealing solution? The idea is nice and all but the syntax... is just so ugly.

<comment><USER12> I was thinking the same thing.

That and I'm not understanding from the page how this is used in the first place. Is the `arguments` implicit variable being passed in some place? (EDIT: yes, via `Function.caller`.) Are the argument values accessed through the result of calling `Args`?

For a non-macro implementation of this, it might be interesting to use function decorator syntax instead, to put the argument processing _outside_ the function body entirely. Basically, the argument processor decorator function would take an options array and a target function, which has all possible parameters, explicitly named. The decorator would spit out a new function that invisibly does all of the wrangling of `arguments` and then finally calls the target function. An advantage is that I think this would be the most minimal pure JS solution from a syntax perspective, and it would keep the actual function body uncluttered. A disadvantage is that it could only really be used with function expressions (not declarations).

<comment> adam-a I'm really excited about sweet.js and JS macros in general, but I haven't had a chance to dive into anything yet. The major disadvantage for me though is it adds a pre-processing step.

<comment><USER12> I think resistance to pre-processing is futile. Most people already use it for minification at the very least. With things like brunch and grunt, pre- processing can be pretty much transparent during development. I actually don't know what sweet.js's sourcemap story is, but potentially transparency could more or less be achieved even during debugging. Maybe we'll eventually even get native JS macro language support!

</comment></comment></comment></comment><comment> andrey-p I created something very similar recently, less features but more lightweight. Didn't plan to publicise it but I thought it's relevant:

[https://github.com/andrey-p/arg-err](https://github.com/andrey-p/arg-err)

</comment><comment><USER13> Seen lots of these at this point. I still don't really understand their purpose.

Its not hard, and doesn't require much, if any, more code than the config options for libraries like this to just handle your arguments normally.

required arguments get defined in your function signature. You assign optional args to local variables defined within your function body via the arguments object. It's pretty easy.

<comment> adam-a The original motivation was providing a single way to deal with a combination of default arguments, optional arguments and the sort of homebrew polymorphism that a lot of libraries use, where a function takes 4 different types of thing and runs through a bunch type tests before doing anything.

For functions with longer parameter lists this should hopefully be more readable too. It's clear what types can be passed to a function.

Out of interest, what other libraries like this have you seen? I did a quick check myself and couldn't find anything comparable.

</comment></comment><comment><USER14> I experimented with something similar a while ago, however my main focus was strictness and not default and optional parameters. I did end up adding it though.

[https://github.com/k0nserv/Strict.js](https://github.com/k0nserv/Strict.js)

<comment><USER15> typo here in your readme:

        this.define('isFemale', female, String.Boolean);

should be

        this.define('isFemale', female, Strict.Boolean);

<comment><USER14> Will fix, thanks for pointing it out.

</comment></comment></comment><comment><USER16> Or you can just use Coffeescript. [http://coffeescript.org/#literals](http://coffeescript.org/#literals)

<comment><USER17> You're missing the validation parts.

</comment></comment><comment><USER18> TypeScript works for me and it doesn't require any additional JS code. Granted, it won't do runtime checks.

</comment><comment><USER19> nice idea but ugly sintax :S</comment>


Lenovo X1 Extreme Gen 2: 9th Gen i9, GTX 1650 - <AUTHOR> https://arstechnica.com/gadgets/2019/05/lenovo-bumps-x1-extreme-to-i9-gtx-1650-introduces-new-mainstream-thinkbooks/ <comment><USER2> This looks like the best laptop you can get for Linux. If only it came with AMD graphics.</comment>


Show HN: An interactive Kubernetes monitoring and control dashboard - <AUTHOR> https://www.magicsandbox.com/cluster-monitoring <comment><AUTHOR> We're spinning out our visualisation from our Kubernetes learning platform (msb.com) into a standalone tool which can be deployed easily into any k8s cluster. I'm happy to answer any questions you might have</comment>


SXSW api - <AUTHOR>

I'm working on a site to make it easier to discover good music at SXSW:
http://gigsounder.com
Unfortunately, despite being a bit of the darling of the tech scene SXSW does not have an API I can plug into for schedule info.  Has anyone figured out a smart way of getting SXSW schedule info programatically? Also, any general feedback on my site will be much appreciated.
Thanks <comment><USER2> Just write a parser that iterates through all the pages and pulls off all the table elements.

      // because of March 7th is the first day we start from there
      for (i = 7; i < end_date; i++) {
          page_contents = scrape_page("http://schedule.sxsw.com/?day=" + i)
          //second iteration for getting all the DOM elements on the page in the schedule
      }

Did I miss something else in your question?

<comment><AUTHOR> Hello jonalmeida - thanks for the quick reply. That's pretty much what I'm doing now. Problem is that a lot of the specific dates and locations haven't been confirmed so I'm going to have to keep re-crawling to see if something has changed. I can't believe there isn't a better solution.</comment></comment>