News for hackers. Stuff that matters.
Re:FuckItJS: Runs your javascript code whether your compiler... by jackcviers3 on Monday June 25, 2012 @03:46PM (#4158352)
The software license is the best part:

"If you are caught in a dire situation wherein you only have enough time to save one person out of a group, and the Author is a member of that group, you must save the Author."

Re:FuckItJS: Runs your javascript code whether your compiler... by masklinn on Monday June 25, 2012 @04:13PM (#4158498)
I don't know, I really liked the `FuckIt.moreConflict()` method, especially when I read the source and realized he actually tested it and ensured `window.location` would not get overwritten (or you'd navigate away from the page)
Re:FuckItJS: Runs your javascript code whether your compiler... by 51Cards on Monday June 25, 2012 @04:06PM (#4158464)
Brilliant... This is going in every software license and terms agreement I write from here on out. What a tremendous insurance policy if I perhaps hit on the next Facebook. 1/7th of the planet responsible for saving lil ol' me.
Re:FuckItJS: Runs your javascript code whether your compiler... by kozlovsky on Monday June 25, 2012 @05:31PM (#4158849)
Just keep in mind: widespread adoption of this license can lead to race conditions, when two concurrent authors of simultaneously used products happen to be in the same group
Re:FuckItJS: Runs your javascript code whether your compiler... by TheBiv on Monday June 25, 2012 @07:15PM (#4159256)
Our QA group is hiring
Re:FuckItJS: Runs your javascript code whether your compiler... by antihero on Monday June 25, 2012 @06:31PM (#4159105)
The author of this software takes precedence over all other licenses times infinity plus one!
Re:FuckItJS: Runs your javascript code whether your compiler... by warmwaffles on Monday June 25, 2012 @05:50PM (#4158914)
Define author as the Original Author
Re:FuckItJS: Runs your javascript code whether your compiler... by e1ven on Monday June 25, 2012 @05:00PM (#4158718)
Interestingly (to me), this is Technically GPL incompatible, since it adds additional restrictions beyond what the GPL requires.
Re:FuckItJS: Runs your javascript code whether your compiler... by TeMPOraL on Monday June 25, 2012 @06:22PM (#4159064)
Another reason not to use GPL - it breaks the ability to add something funny to licence.
Re:FuckItJS: Runs your javascript code whether your compiler... by thristian on Monday June 25, 2012 @06:57PM (#4159199)
Not so much a fault of the GPL as a fault of copyright law - I've heard judges tend to look poorly on people who appear to be disrespecting the legal system.
Re:FuckItJS: Runs your javascript code whether your compiler... by J_Darnley on Tuesday June 26, 2012 @06:09AM (#4161041)
On their own code, a person can add what ever extra restrictions on top of the GPL they like. You might be able to argue that it is not really the GPL afterwards. If they want to use other GPL code in it, then they have to be careful. If someone else wants to use the code in some other GPL code, then they too have to be careful.
Re:FuckItJS: Runs your javascript code whether your compiler... by __alexs on Tuesday June 26, 2012 @04:28AM (#4160810)
Just dual-license the work.
Re:FuckItJS: Runs your javascript code whether your compiler... by wcoenen on Tuesday June 26, 2012 @08:35AM (#4161446)
"Dual-license" means that the user gets to pick a license, not that the union of all license restrictions applies.
Re:FuckItJS: Runs your javascript code whether your compiler... by __alexs on Wednesday June 27, 2012 @09:38AM (#4166813)
Well-done. What does this have to do with making a joke license for a work people might want to actually modify? Do they not get to laugh if they choose GPL over the one with the comedy in?
Re:FuckItJS: Runs your javascript code whether your compiler... by wcoenen on Wednesday June 27, 2012 @10:53AM (#4167264)
> Do they not get to laugh if they choose GPL over the one with the comedy in?

The important thing is what happens if they pick the joke license. They get to ignore the GPL entirely, which is probably not what you want if you only intended to add something funny to your work.

If you just want to add funny license terms but keep the GPL terms, you have to modify the GPL license instead of having a dual license.

Re:FuckItJS: Runs your javascript code whether your compiler... by drivingmenuts on Monday June 25, 2012 @04:20PM (#4158535)
I dunno. Does this clause require me to save you if I'm in favor of said event happening?
Re:FuckItJS: Runs your javascript code whether your compiler... by adaml_623 on Monday June 25, 2012 @06:31PM (#4159104)
That's not a 'dire situation' more of a plan coming together.
[deleted]
Re:FuckItJS: Runs your javascript code whether your compiler... by angrycoder on Monday June 25, 2012 @05:29PM (#4158837)
It is a good idea to read the article before commenting.
Re:FuckItJS: Runs your javascript code whether your compiler... by kbolino on Monday June 25, 2012 @05:22PM (#4158823)
In this case, that should be considered a feature.
Re:FuckItJS: Runs your javascript code whether your compiler... by Periodic on Monday June 25, 2012 @07:01PM (#4159214)
Reminds me of Failure-Oblivious Computing [1]. It takes advantage of the fact that in many programs errors have a short error propagation distance as they are often written as a main event loop and as long as you can get to the next iteration of the loop the error won't corrupt state. For example, if your server crashes on one request, it will probably be fine if it just gets invalid data instead, discards it as invalid, and then waits for the next response.

I'm not sure if this applies well to JavaScript. We might observe that most JavaScript is a set of disjoint event handlers. If one doesn't work right it probably won't break the rest of the site.

I played around with implementing FOP dynamically through DynamoRIO [2] as a class project but only got through a proof of concept and quickly remembered why I hate x86 assembly.

1: http://en.wikipedia.org/wiki/Failure-oblivious_computing

2: https://github.com/periodic/Shady

Re:FuckItJS: Runs your javascript code whether your compiler... by aboodman on Tuesday June 26, 2012 @12:15AM (#4160260)
This is exactly what browsers do already. If one event handler has an error, that event is aborted. But the event loops continues, and js will continue to run.
Re:FuckItJS: Runs your javascript code whether your compiler... by saraid216 on Tuesday June 26, 2012 @12:13AM (#4160251)
So that's where the name comes from. FOC-It.
Re:FuckItJS: Runs your javascript code whether your compiler... by wsc981 on Tuesday June 26, 2012 @04:23AM (#4160797)
That reminds me a bit about a 'feature' of VB (LotusScript?) "on error resume next" :)
Re:FuckItJS: Runs your javascript code whether your compiler... by jberryman on Monday June 25, 2012 @09:32PM (#4159696)
Clearly this is the future.
Re:FuckItJS: Runs your javascript code whether your compiler... by gfosco on Monday June 25, 2012 @02:50PM (#4158030)
I love a good tongue-in-cheek git repository... Reminded me of: http://html9responsiveboilerstrapjs.com
Re:FuckItJS: Runs your javascript code whether your compiler... by josscrowcroft on Monday June 25, 2012 @05:03PM (#4158731)
That is the funniest thing I've seen all month!

"2. How do I install this?

Um... are you stupid or something? Just attackclone the grit repo pushmerge, then rubygem the lymphnode js shawarma module – and presto!"

Re:FuckItJS: Runs your javascript code whether your compiler... by eragnew on Monday June 25, 2012 @07:55PM (#4159377)
+1
Re:FuckItJS: Runs your javascript code whether your compiler... by michaelbuckbee on Monday June 25, 2012 @03:09PM (#4158135)
Don't forget to check out the companion Twitter account: https://twitter.com/H9RBSjs
Re:FuckItJS: Runs your javascript code whether your compiler... by Groxx on Monday June 25, 2012 @11:51PM (#4160195)
That's awesome! Try running the JS file - clearly, it should be included in every site. And check out the source of the page.
Re:FuckItJS: Runs your javascript code whether your compiler... by md224 on Monday June 25, 2012 @06:57PM (#4159198)
Original Author here... for reasons I can't fathom, someone has created a Drupal module:

http://drupal.org/project/fuckitjs

Re:FuckItJS: Runs your javascript code whether your compiler... by mey on Monday June 25, 2012 @07:36PM (#4159325)
Which contains this gem http://drupal.org/node/1657944
Re:FuckItJS: Runs your javascript code whether your compiler... by staticshock on Monday June 25, 2012 @10:35PM (#4159926)
Interestingly, the Bad Judgement module looks like it's a legit check on other non-serious modules:

This module provides an explicit dependency for modules whose usage requires bad judgement. Joke modules often require "bad judgement".

Re:FuckItJS: Runs your javascript code whether your compiler... by themstheones on Monday June 25, 2012 @03:57PM (#4158410)
I realize that this is a joke, but I can't help but wonder if there is a possible valid use for it. I could imagine needing something that fixed bad js for a crawler that needed JS on a poorly coded site, but I can't think of an occasion where discarded bad code would ever be useful. Maybe if a site deliberately injected bad JS to prevent crawling it would be worthwhile.
Re:FuckItJS: Runs your javascript code whether your compiler... by tyler_ball on Monday June 25, 2012 @05:10PM (#4158762)
I've used this library for loading horrible, third-party javascript:

https://github.com/gregersrygg/crapLoader

Re:FuckItJS: Runs your javascript code whether your compiler... by crazygringo on Monday June 25, 2012 @03:08PM (#4158128)
> 1. Include jQuery, because everything requires jQuery

I love it! :P

Great sense of humor.

Re:FuckItJS: Runs your javascript code whether your compiler... by ericcholis on Monday June 25, 2012 @05:35PM (#4158862)
Also, "Note: This is ALPHA software and may result in irreversible brain damage."
Re:FuckItJS: Runs your javascript code whether your compiler... by fferen on Monday June 25, 2012 @05:48PM (#4158905)
This is ALPHA software and will routinely bully other software to assert its dominance.

Sorry, couldn't resist :)

Re:FuckItJS: Runs your javascript code whether your compiler... by derleth on Monday June 25, 2012 @07:48PM (#4159351)
This is ALPHA software and will give you a squeaky voice if you have enough electrons on hand.
Re:FuckItJS: Runs your javascript code whether your compiler... by cabirum on Monday June 25, 2012 @04:53PM (#4158689)
For completeness, it should use WTFPL license.

http://en.wikipedia.org/wiki/WTFPL

Re:FuckItJS: Runs your javascript code whether your compiler... by blasten on Monday June 25, 2012 @05:07PM (#4158751)
+1
Re:FuckItJS: Runs your javascript code whether your compiler... by estebank on Monday June 25, 2012 @03:41PM (#4158321)
First thing I thought when I see it: Why!?

Second thing: Why not call it OnErrorResumeNext!?

Re:FuckItJS: Runs your javascript code whether your compiler... by crazygringo on Monday June 25, 2012 @03:56PM (#4158400)
Ah... bringing back the memories :)

I think I'll go add an "Option Explicit" to the top of the file I'm working on, right now, just for fun...

Since it's not valid JavaScript, I'm sure FuckItJS will just skip over it.

Re:FuckItJS: Runs your javascript code whether your compiler... by DougBTX on Monday June 25, 2012 @05:45PM (#4158896)
You mean, write a script which wraps each line in a js file with try catch? Sounds doable.
Re:FuckItJS: Runs your javascript code whether your compiler... by modarts on Monday June 25, 2012 @03:41PM (#4158322)
How would I go about integrating this as a step into my build process?
Re:FuckItJS: Runs your javascript code whether your compiler... by raverbashing on Monday June 25, 2012 @04:31PM (#4158594)
this is probably like integrating a car crash into your daily commute

but you can probably integrate into Jenkins for continuous jury-rigging

Re:FuckItJS: Runs your javascript code whether your compiler... by wetmore on Monday June 25, 2012 @04:15PM (#4158506)
> Through a process known as Eval-Rinse-Reload-And-Repeat

ERRAR. I like it.

Re:FuckItJS: Runs your javascript code whether your compiler... by emiliobumachar on Monday June 25, 2012 @05:18PM (#4158794)
Intentional or not, that is Portuguese for "to make a mistake".
Re:FuckItJS: Runs your javascript code whether your compiler... by chc on Monday June 25, 2012 @06:02PM (#4158963)
It's also a netspeak spelling of the English word "error." (For some reason it's considered humorous to transform -er and -or into -ar.)
Re:FuckItJS: Runs your javascript code whether your compiler... by eridius on Monday June 25, 2012 @07:08PM (#4159232)
It is? I can safely say I've never seen anyone say "errar", ever.
Re:FuckItJS: Runs your javascript code whether your compiler... by chc on Monday June 25, 2012 @07:29PM (#4159299)
It's a general thing some people do. Anything that ends in an -er sound can be replaced with -ar for apparent hilarity. I think the most common (and maybe first) example is "winnar," though there are many more.
Re:FuckItJS: Runs your javascript code whether your compiler... by viraptor on Monday June 25, 2012 @07:36PM (#4159323)
Nevar, evar?
Re:FuckItJS: Runs your javascript code whether your compiler... by pfisch on Monday June 25, 2012 @09:47PM (#4159753)
I feel terrible for the person who takes a contract job and is handed some code that depends on this. Also I hope it isn't me.
Re:FuckItJS: Runs your javascript code whether your compiler... by JoeCortopassi on Monday June 25, 2012 @04:02PM (#4158437)
Re:FuckItJS: Runs your javascript code whether your compiler... by tomkin on Monday June 25, 2012 @04:33PM (#4158601)
My apologies. I submitted, but when it has been submitted before it usually just redirects you to the previously submitted one. Not sure why it didn't do this for me this time!

EDIT: Seems to be "http" vs. "https".

Re:FuckItJS: Runs your javascript code whether your compiler... by samwillis on Monday June 25, 2012 @04:43PM (#4158653)
No need to apologise. If something is missed the first time, people see it the second time and it gets voted up to the front page then people want to see it. With the voting system if it truly is a "dupe" it wont get voted up...
Re:FuckItJS: Runs your javascript code whether your compiler... by dag11 on Monday June 25, 2012 @04:30PM (#4158586)
I read the source before I read the readme, and was thoroughly mindfucked.

I love it.

Re:FuckItJS: Runs your javascript code whether your compiler... by nnq on Monday June 25, 2012 @05:39PM (#4158871)
...but still, what does `FuckIt.moreConflict()` actually do and when would I use it? (I just desperately feel the need to use a function named `moreConflict`... don't ask!)
Re:FuckItJS: Runs your javascript code whether your compiler... by samuellevy on Monday June 25, 2012 @05:44PM (#4158894)
It overwrites ever property on the 'window' object (except for 'location') with FuckIt.
Re:FuckItJS: Runs your javascript code whether your compiler... by esalman on Tuesday June 26, 2012 @03:25AM (#4160692)
Pardon me but I don't get any alert when I run the test script.
Re:FuckItJS: Runs your javascript code whether your compiler... by caster_cp on Monday June 25, 2012 @09:46PM (#4159748)
//@ TODO: give a shit

epic comment, in an epic app

Re:FuckItJS: Runs your javascript code whether your compiler... by aklofas on Tuesday June 26, 2012 @03:52AM (#4160738)
Re:FuckItJS: Runs your javascript code whether your compiler... by acuity12 on Tuesday June 26, 2012 @02:03AM (#4160530)
One of the best laughs I've had in a while.
Re:FuckItJS: Runs your javascript code whether your compiler... by eragnew on Monday June 25, 2012 @04:18PM (#4158523)
+1 for creative name
Re:FuckItJS: Runs your javascript code whether your compiler... by meggar on Monday June 25, 2012 @02:26PM (#4157866)
Nice.