Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Official FROZEN VOID fan thread

Name: Anonymous 2009-01-05 22:33

In Javascript 1.7 another feature was introduced into the language,by far the most useful yet. Its Destructuring assignment- a mix of array swap and initialization. [1]

KING OF TROLLS


[1] http://frozenvoid.blogspot.com/2008/12/destructuring-assignment.html

Name: Anonymous 2009-01-05 22:44

He's not a troll, he's an [b]idiL"Kjł1kj32KJL"KJ¤3k4j@NO CARRIER

Name: Anonymous 2009-01-05 23:52

>>1
SPAWHBTC

Name: Anonymous 2009-01-06 0:32

>>3
I am not >>1...

Name: Anonymous 2009-01-06 0:33

>>4
Wait, I mean I'm not >>2

Name: FrozenVoid !FrOzEn2BUo 2009-01-06 6:31

>>1
It is actually the most useful feature of JavaScript 1.7.
Its saves me time using intermediate variables(however in critical loops variables beat destructuring assignment by 50%-75% less time)

Name: Anonymous 2009-01-06 6:38

// ==UserScript==
// @name           fix prog
// @description    fixes all of FrozenVoid!FrOzEn2BUo's posts on /prog/
// @namespace      http://dis.4chan.org/prog/
// @include        http://dis.4chan.org/*;
// @version        1.0
// ==/UserScript==

(function(){
document.getElementsByClassName = function(cl) {
var retnode = [];
var myclass = new RegExp('\\b'+cl+'\\b');
var elem = this.getElementsByTagName('*');
for (var i = 0; i < elem.length; i++) {
var classes = elem[i].className;
if (myclass.test(classes)) retnode.push(elem[i]);
}
return retnode;
};

 var posts = document.getElementsByClassName('post');
 for(var i = 0; i < posts.length; ++i){
  var postername = posts[i].getElementsByTagName('span')[3];
  var postertrip = posts[i].getElementsByTagName('span')[4];
  if(postername.innerHTML == 'FrozenVoid' && postertrip.innerHTML == '!FrOzEn2BUo')
   posts[i].parentNode.removeChild(posts[i]);
 }
})();

Name: FrozenVоid !FrOzEn2BUo 2009-01-06 6:48

>>7
You don't need to encapsulate the filter in function if you call it once.

Name: Anonymous 2009-01-06 7:40

>>7
Thanks

Name: Anonymous 2009-01-06 7:43

>>8
fixed:
// ==UserScript==
// @name           fix prog
// @description    fixes all of FrozenVoid!FrOzEn2BUo's posts on /prog/
// @namespace      http://dis.4chan.org/prog/
// @include        http://dis.4chan.org/*;
// @version        1.1
// ==/UserScript==

(function(){
 var posts = [];
 var myclass = new RegExp('\\bpost\\b');
 var divs = document.getElementsByTagName('div')
 for(var i = 0; i < divs.length; ++i){
  var classes = divs[i].className;
  if(myclass.test(classes)) posts.push(divs[i]);
 }
 for(var i = 0; i < posts.length; ++i){
  var postername = posts[i].getElementsByTagName('span')[3];
  var postertrip = posts[i].getElementsByTagName('span')[4];
  if(/^!FrOzEn2BUo/.test(postertrip.innerHTML))
   posts[i].parentNode.removeChild(posts[i]);
 }
})();

Name: FrozenVoid !FrOzEn2BUo 2009-01-06 7:52

>>10
 for(var i = 0; i < divs.length; ++i){
  var classes = divs[i].className;
  if(myclass.test(classes)) posts.push(divs[i]);
 }

can be faster with

var divl=divs.length
 for(var i = 0; i < divl; ++i){
  var classes = divs[i].className;
  if(myclass.test(classes)) posts.push(divs[i]);
 }
Because you call divs.length on every iteration.

Name: Anonymous 2009-01-06 7:55

>>11
Wouldn't TraceMonkey optimize that?

Name: FrozenVoid !FrOzEn2BUo 2009-01-06 7:58

>>12
What if you alter divs Object(HTML DOM collection) by removing its nodes?
How tracemonkey going to know in advance divs.length can't change?

Name: Anonymous 2009-01-06 8:05

stop fucking obsessing about a single hash table lookup, moron.

Name: Anonymous 2009-01-06 8:07

>>10
Code was OK but you should try using destructuring assignment, it's Javascript1.7's most useful feature.

Name: FrozenVoid !FrOzEn2BUo 2009-01-06 8:08

>>14
I'm  afraid the script doesn't involve any Hash tables,or for that matter any "tables". Dom collections are HTML objects.

Name: FrozenVoid !FrOzEn2BUo 2009-01-06 8:10

>>15
A feature misuse isn't making it useful.
If he had a bunch of variables which needed assignment he could use the array(destructuring) method.

Name: Anonymous 2009-01-06 8:11

Single hash table lookup and possibly cross-language JS-to-C++ invocation, you mean. Not that you're wrong; he's still a moron.

Name: Anonymous 2009-01-06 8:12

>>1-18
WHBTC

Name: FrozenVoid !FrOzEn2BUo 2009-01-06 8:15

Wexford Harbour Boat and Tennis Club?
How in the hell this is related to the thread?

Name: Anonymous 2009-01-06 8:16

>> 16

Oh yeah, arrays aren't prototypes. So it only dispatches on dynamic type, it's even cheaper that way.

>> 12

Depends on whether it does any type inference.

Name: Anonymous 2009-01-06 8:18

>> 16

Dom collections? A separate type? Eh. So is it a prototype or what?

Name: FrozenVoid !FrOzEn2BUo 2009-01-06 8:24

>>22
DOM collection is the Object the code returns after invoking getElements() method.
Its not a Hash table. Its can be accessed either as Object.node.notation or as array.

Name: Anonymous 2009-01-06 8:47

Objects are implemented as a structure with fields: class (type designator) and an associative table of member variables/functions. Performing an operation such as returning a member variable 'length' consists of walking down the prototype chain until one of the objects contains given variable.

So it's a hash lookup alright.

Name: FrozenVoid !FrOzEn2BUo 2009-01-06 8:54

>>24
Whats the hashing function used? MD5? SHA1?

Name: Anonymous 2009-01-06 9:02

Are you a moron or trolling? Military-grade crypto induces too high an overhead to be used in a mere hash table. RTFM: http://en.wikipedia.org/wiki/Hash_table#Choosing_a_good_hash_function

Yes, you are definitely a troll.

Name: FrozenVoid !FrOzEn2BUo 2009-01-06 9:03

>>26
Why not just Number the object properties 1,2,3?
Why the need to involve hash functions at all?

Name: Anonymous 2009-01-06 9:04

At first, I was annoyed with FrozenVoid. Now I am a fan as she is an expert troll. I would even dare say her levels are reaching satori.

Name: FrozenVoid !FrOzEn2BUo 2009-01-06 9:09

imaginary code  >>24,26 believes is actually used:
get_variable_names_();
convert_variables_to_hash_value():
construct_hash_table();
convert_hashtable_to_prototype_array();

Actual code :
build_Array[0:Var1:value1,1:var2:value2,2:var3:[childnode1:var1:value1],]

Name: Anonymous 2009-01-06 9:10

>> 27

Not only can't they be enumerated at compile time (reduces to the halting problem), properties can be added/removed at runtime as well.

inb4 not going to explain the halting problem

Name: FrozenVoid !FrOzEn2BUo 2009-01-06 9:11

>>30
Adding/removing array elements is hard?

Name: Anonymous 2009-01-06 9:11

WHAT A FUCKING RETARD
I HATE FROZEN VOID SO MUCH
FROZEN VOID IS A CANCER KILL PROG
DIE FROZEN VOID DIE

Name: !WokonZwxw2 2009-01-06 19:16

sup guys. should i return and take care of this joker?

Name: Anonymous 2009-01-10 5:27

>>33
How you can "take care" when you don't have any authority over me?

Name: Anonymous 2009-01-10 12:14

>>10
Thank you, kind sir.

Name: Anonymous 2009-01-10 13:02

>>35
WELCOME TO THE BLISS

Name: Anonymous 2009-01-13 14:31

Trailining semiconon in >>10 on include name didn't work for me on GM 0.8.2.

Name: Anonymous 2009-01-20 9:38

>>10
Sometimes I wish I could have a peek-button, kinda like /b/ackwash [1]. It would make it easier to see what people reply to. I for myself am too busy (and by that I mean lazy) to do it myself, so is anyone up for it?

______

[1]: http://userscripts.org/scripts/show/25876

Name: Anonymous 2009-01-20 9:50

Bug in Firefox nightlies/GM still not fixed, too lazy to downgrade, oh well.

>>38
[Shameless self-advertisement]
You could use my Post Filter thing at http://userscripts.org/scripts/show/31838, though it would require editing the script. You also may not like the expert post linking.

Name: Anonymous 2009-01-20 9:58

>>37
semiconon

Conan O'Br

Name: Anonymous 2009-01-20 11:19

>>39
This will require me editing, but even the normal version is a nice thing to have.

Name: Anonymous 2009-01-20 13:04

>>38
It already exists.

http://en.pastebin.ca/1049190

Name: Anonymous 2009-01-20 13:42

>>42
Thank you, kind sir. That was pretty much exactly what I was looking for.

Name: >>39 2009-01-20 14:33

Oh, forgot about hax my anus. I should really install that.

Name: Anonymous 2009-01-20 14:52

I HATE JAVASCRIPT

Name: HMA FAN 2009-01-20 16:38

>>44
wat

Name: FrozenVoidFan 2009-01-20 23:30

>>45
and javascript hates you too!

Name: Anonymous 2009-01-21 0:05

PLEASE WAIT, HAXING ANII...

Name: Anonymous 2009-01-23 14:14

>>=10

// ==UserScript==
// @name           Fix /prog/
// @description    Removes FrozenVoid's posts, along with replies.
// @namespace      http://dis.4chan.org/prog/
// @include        http://dis.4chan.org/*;
// @version        1.2
// ==/UserScript==

(function(){
 var deleted = {};
 var posts = [];
 var myclass = new RegExp('\\bpost\\b');
 var divs = document.getElementsByTagName('div')
 for(var i = 0; i < divs.length; ++i){
  var classes = divs[i].className;
  if(myclass.test(classes)) posts.push(divs[i]);
 }
 for(var i = 0; i < posts.length; ++i){
  var post = posts[i];
  var form = post.parentNode.getElementsByTagName('form')[0];
  if(!form) {
    form = post.parentNode;
    while(form != null && form.nodeName != "FORM")
      form = form.nextSibling;
  }
 
  var threadID = parseInt(form.elements.namedItem("id").value);
  var postID = parseInt(post.getElementsByTagName('span')[0].textContent);
 
  var postername = post.getElementsByTagName('span')[3];
  var postertrip = post.getElementsByTagName('span')[4];
 
  var bad = /^!FrOzEn2BUo/.test(postertrip.innerHTML);
  if(!bad) {
    var links = post.getElementsByTagName('a');
   
    for(var j = 0; j < links.length; ++j) {
     var m = links[j].textContent.match(/^>>(\d+)/);
    
     if(m && deleted[[threadID, m[1]]]) {
       bad = true;
       break;
     }
    }
  }
 
  if(bad) {
   posts[i].parentNode.removeChild(posts[i]);
   deleted[[threadID, postID]] = true;
  }
 }
})();

Name: 49-san 2009-01-23 14:15

What? I'm sure I removed the ';' from @include. Make sure to remove that if you're using Opera.

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !FrOzEn2BUo 2009-01-23 14:18

>>50
Please use less OOP cruft. Its  superfluous   when you just scan for a single regexp

_________________________
orbis terrarum delenda est
 http://xs135.xs.to/xs135/09042/av922.jpg

Name: Anonymous 2009-01-23 20:03

Welcome to Shiichan

Name: Anonymous 2009-01-29 13:21

>>52
Welcome to the future.

Name: Anonymous 2009-03-06 11:20


/kft!

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !fRoZeNHN4I 2009-08-20 12:52

It's good to be loved.

Name: Anonymous 2011-02-03 2:22

Name: Anonymous 2011-02-03 2:56

Name: Anonymous 2011-02-04 19:07

Don't change these.
Name: Email:
Entire Thread Thread List