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

Pages: 1-4041-

Javascript

Name: Anonymous 2013-02-12 16:40

Guys, I wanna learn more about javascript, but I only know a basic idea about it.
Any resources to help me?

Name: Anonymous 2013-02-12 16:41

Read the source codes of web sights.

-----------------------------------------------------------------

You say Taylor Swift, I say Korn
You say Lady Gaga,I say Paramore
You say Miley Cyrus,I say $lipknot
You say T-Paine,I say Red Hot Chili Peppers
You say Emanem,I say Linkin Park
You say Justin Beiber, I say System of a Down

98% of teens have turned to main stream music.If you are part of the 4% that still listens to real music, copy and paste this message to your sig. DONT LET ROCK "N" ROLL DIE !

Name: Anonymous 2013-02-12 16:42

>>2
Um, that's not a good suggestion...

Name: Anonymous 2013-02-12 16:49

Name: Anonymous 2013-02-12 17:05

>>4
Thanks, that sounds nice.
But it doesn't really answer my question.

Name: Anonymous 2013-02-12 17:26

Try writing programs in it

Name: Anonymous 2013-02-12 17:34

>>6
I already use it in web design and userscripts, though.

Name: Anonymous 2013-02-12 17:35

Try ditching ``web development'' altogether, it's a Jewish-funded ``industry'' as shown by Hacker Jews and Reddit.

Name: Anonymous 2013-02-12 17:50

Try ditching ``programming'' altogether, it's a Jewish-funded ``industry'' as shown by Google, Microsoft and Oracle.

Name: Anonymous 2013-02-12 17:53

Name: Anonymous 2013-02-12 18:30

>>8
>>9
Nice Non-sequitur, kike.

Name: >>11 2013-02-12 18:34

Also I have a nice question for you: have you goys ever craved jewish cock so badly that you found yourself running around outside, howling at the moon for it? Literally ROARING at the top of your lungs, wanting nothing less than a jews's dick head churning against your glottal stop?

Tell me I'm not alone

Name: Anonymous 2013-02-12 18:51

>>11
Why the fuck would a kike try to repel people from kike industries?

Are you fucking dead in the head, Mudslime?

Name: Anonymous 2013-02-12 18:54

>>13
Because it isn't a kike industry, dumbass.

Name: Anonymous 2013-02-12 18:57

>>14
Where's Nikita and the JEWS in Computer Science list when you need him?

Name: Anonymous 2013-02-12 18:57

>>14
Shalom!

Name: >>15>>16 2013-02-12 19:00

By the way, I'm just wondering: have you goys ever craved jewish cock so badly that you found yourself running around outside, howling at the moon for it? Literally ROARING at the top of your lungs, wanting nothing less than a jews's dick head churning against your glottal stop?

Tell me I'm not alone!

Name: Anonymous 2013-02-12 19:01

>>15
>>16
Illogical racist cretin detected

Name: Anonymous 2013-02-12 19:03

>>18
False-flag attacking antisemite detected

-funroll-quotes

Name: Anonymous 2013-02-12 19:12

>>18
Illogical unoptimized quotes Ahmed detected

Name: Anonymous 2013-02-12 20:18

Name: Anonymous 2013-02-13 5:21

>>21
I never understood the point of those links before.
Also, I don't use node.js

Name: Anonymous 2013-02-13 5:39

>>22
He's probably trying to dissuade people from learning Javascript. It's too bad that Javascript works.

Name: Anonymous 2013-02-13 5:48

>>23
Skullfucking a dead baby ``works'' if you're trying to get off. Doesn't mean you should actually do it.

Name: Anonymous 2013-02-13 7:40

>>24
Why would you skullfuck a dead baby?
I don't think their skulls are good for fucking either

Name: Anonymous 2013-02-13 8:37

Javashit, the browser PHP

Name: Anonymous 2013-02-13 8:49

>>23
Java, PHP, C# and Sepples work too.

Too bad they're shit.

Name: Anonymous 2013-02-13 8:55

>>26
What's PHP then?

Name: Anonymous 2013-02-13 9:13

>>28
The server PHP. Idiot.

Name: Anonymous 2013-02-13 9:26

>>28
A miserable Pile of Horse Poo.

Name: Anonymous 2013-02-13 10:12

>>1
>2013
>Javascript

Name: Anonymous 2013-02-13 11:05

>>30
Shalom!

Name: Anonymous 2013-02-13 13:53

>>31
coffeescript?

Name: Anonymous 2013-02-13 14:39

>>25
Because of jewish compulsion and vice for committing the most evil acts they can against the gentiles. Their lives are defined around it. Whichever jew has the highest score for atrocities against gentils, they become the head jew.

Name: Anonymous 2013-02-13 17:21

>>31
Please refrain from quoting text like an imageboard user would do.

If you feel strong urges to do it, you can do it here:
http://boards.4chan.org/b/
http://boards.4chan.org/g/

Name: Anonymous 2013-02-13 18:47

>>35
Not >>31

>I still feel like it.
_this makes look wrong_
(and we hate english to use parenthesis)
/me so doing >feels better.

nyan

Name: Anonymous 2013-02-13 19:06

>>36
Document Symta.

Name: >>36 !265XGj4R92!TUYh4YFpLwqf26E 2013-02-13 19:18

>>37
Um, I use C, ATS, and CL or Scheme. I do not know $ymt4.

Name: Anonymous 2013-02-13 19:31

>>38
Document $ymt4.

Name: Anonymous 2013-02-13 21:05

I tried to embed some Javascript in a code block on THIS VERY PAGE!!! and was thwarted by some handy-dandy probably PHP. 

Tryin' to keep a nigga down...

Name: Anonymous 2013-02-13 22:17

java shit

Name: Anonymous 2013-02-13 22:43

Name: Anonymous 2013-02-13 23:17

>>38
If you don't use Symta, you're shit.

Name: Anonymous 2013-02-13 23:20

>>43
Which "Symta"? There are at least 5 different versions of the language. First was written in C/C++, others in Common Lisp, but featured different syntax and semantics (i.e. some supported continuations, others dont)

Name: Anonymous 2013-02-14 1:30

>>44
Could I have a link to the C/C++ version?

Name: Anonymous 2013-02-14 1:36

Java/JavaScript > C/C++

Name: Anonymous 2013-02-14 1:45

>>46
Write a Symta interpreter in Java/JavaScript and maybe I'll believe you.

Name: Anonymous 2013-02-14 1:53

Why don't you document it, seriously? Make it kvassware or something. I know, you will say that you don't want a paypal account because they are jews...

Name: Anonymous 2013-02-14 2:50

>>45
I scrapped it long ago, when I discovered Lisp. It had some regexp like capability, where instead of function call regepx matching was done.

Most of the code was just crud like...


// Page System

#include <string.h>
#include "ps.h"
#include "mm.h"
#include "im.h"


#define HEADER_SIZE     MM_PAGE_SIZE
#define PAGE_SIZE       MM_PAGE_SIZE
#define OFF_BITS        CBITS(PAGE_SIZE-1)
#define PTE_SIZE        32 /* page table entry size */

typedef struct {
  char magic[8];
  u8 version;
  u8 im_size;   // image size
  u8 npages;
  u8 pt_size;   // page table size
  u8 pt_off;
  u8 pages_off; // offset of pages area
} Header;

static u1 header[HEADER_SIZE];

#define h (*(Header*)header)

typedef struct {
  u8 len;
  u8 next;
} Pte;

#define PTE(n,w) ((Pte*)(mm_a(h.pt_off+(n)*PTE_SIZE,w)))

void ps_init() {
  mm_r(header, 0, HEADER_SIZE);
}

void ps_quit() {
  mm_w(0, header, HEADER_SIZE);
}

void ps_format() {
  Pte *e;
  strcpy(h.magic, "SYMTERA");
  h.version = 0;
  h.im_size = im_get_size();
  // -1 is required for h.pages_off alignment
  h.npages = (h.im_size-HEADER_SIZE)/(PAGE_SIZE+PTE_SIZE) - 1;
  h.pt_size = h.npages*PTE_SIZE;
  h.pt_off = HEADER_SIZE;
  h.pages_off = ((h.pt_off+h.pt_size+PAGE_SIZE-1) /
                 PAGE_SIZE)*PAGE_SIZE;

  e = PTE(0,1);
  e->len = 0;
  e->next = 1;
  e = PTE(1,1);
  e->len = h.npages-1;
  e->next = 0;
  mm_w(0, header, HEADER_SIZE);
}

u8 ps_alloc(int npages) {
  Pte *e, *ne;
  u8 pn, n;
  for(n = 0; ; pn = n, n = e->next) {
    e = PTE(n,0);
    if(e->len < npages) {
      if(e->next == 0) break;
      continue;
    }

    if(e->len == npages) {
      PTE(pn,1)->next = e->next;
      return h.pages_off + (n<<OFF_BITS);
    }
    // note that alternatively we could cutoff block's tail
    ne = PTE(n+npages,1);
    ne->len = e->len - npages;
    ne->next = e->next;
    PTE(pn,1)->next = n+npages;
    PTE(n,1)->len = npages;
    return h.pages_off + (n<<OFF_BITS);
  }
  return 0;  // no suitable block found or ring is empty
}

void ps_free(u8 p) {
  Pte *e, *pe;
  u8 n, pl;
  p = (p - h.pages_off) >> OFF_BITS;
  pl = PTE(p,0)->len;
  for(n = 0; ; n = e->next) {
    e = PTE(n,0);
    if(!(n < p && (p+pl <= e->next || !e->next))) continue;

    e = PTE(n,1);
    if(n+e->len == p) {
      e->len += pl;
      p = n;
      pe = e;
    } else {
      pe = PTE(p,1);
      pe->next = e->next;
      e->next = p;
    }

    if(p+pe->len == pe->next) {
      e = PTE(pe->next, 0);
      pe->len += e->len;
      pe->next = e->next;
    }
  }
}

#include <string.h>

#include "arc.h"
#include "im.h"
#include "mm.h"

#define ht           ((ARC_CDB**)MM(MM_HT_OFF)) /* hash table */
#define cdbt         (ARC_CDB*)MM(MM_CD_OFF)
#define frames       MM(mm_frames_off)

static ARC_List t1, b1, t2, b2;

// Target length of t1 list:
//   increase it, if a hit in the history B1 is observed; similarly,
//   decrease it, if a hit in the history B2 is observed.
static int target_t1;


static ARC_CDB *unlink_cdb(ARC_CDB *cdb) {
  cdb->list->len--;
  cdb->prev->next = cdb->next;
  cdb->next->prev = cdb->prev;
  return cdb;
}

static ARC_CDB *remove_lru(ARC_List *l) {
  return unlink_cdb(l->tail.prev);
}

static void insert_mru(ARC_List *l, ARC_CDB *cdb) {
  l->len++;
  cdb->list = l;
  cdb->prev = &l->head;
  cdb->next = cdb->prev->next;
  cdb->prev->next = cdb;
  cdb->next->prev = cdb;
}

static void ht_insert(ARC_CDB *cdb) {
  u4 h = cdb->page%MM_HT_LEN;
  cdb->hn = ht[h];
  ht[h] = cdb;
}

#if 0
static ARC_CDB *ht_get(u4 page) {
  u4 h = page%MM_HT_LEN;
  ARC_CDB *p = ht[h];

  for( ; p && p->page != page; p = p->hn);

  return p;
}
#endif

static void ht_remove(ARC_CDB *cdb) {
  u4 h = cdb->page%MM_HT_LEN;
  ARC_CDB *p = ht[h], **q = ht+h;

  for(;;) {
    if(p == cdb) {
      *q = p->hn;
      return;
    }
    q = &p->hn;
    p = p->hn;
  }
}


static void init_list(ARC_List *l) {
  l->len = 0;
  l->head.prev = 0;
  l->tail.next = 0;
  l->head.next = &l->tail;
  l->tail.prev = &l->head;
}

// finds a frame for incoming page
static u1 *replace() {
  ARC_CDB* cdb;
  u1 *r;

  // T1's size exceeds target?
  if(t1.len >= max(1, target_t1)) insert_mru(&b1, cdb = remove_lru(&t1));
  else insert_mru(&b2, cdb = remove_lru(&t2));

  // if dirty, evict before overwrite
  if(cdb->dirty) im_put(cdb->page, cdb->ptr);

  mm_clear_tlb_entry(cdb->page);

  r = cdb->ptr;
  cdb->ptr = 0;

  return r;
}

ARC_CDB *arc_get_cdb(u4 page) {
  u4 h = page%MM_HT_LEN;
  ARC_CDB *a = ht[h];

  // try to find the CDB for requested page
  for( ; a; a = a->hn) if(a->page == page) {
    if(a->ptr) { // hit in cache: t1 or t2
      insert_mru(&t2, unlink_cdb(a)); // seen twice, transfer on T2
      return a;
    }

    // else hit in history: b1 or b2
    if(a->list == &b1) // adapt the target to favor recency
      target_t1 = min(target_t1 + max(b2.len/b1.len, 1), MM_NFRAMES);
    else // adapt the target to favor frequency
      target_t1 = max(target_t1 - max(b1.len/b2.len, 1), 0);

    unlink_cdb(a);             // take off whichever list
    insert_mru(&t2, a);        // seen twice recently, put on T2
    a->ptr = replace();
    a->page = page;
    a->dirty = false;
    im_get(a->ptr, a->page); // load page into cache
    return a;
  }

  if(t1.len + b1.len == MM_NFRAMES) {  // B1 + T1 full?
    if(t1.len < MM_NFRAMES) { // Still room in T1?
      a = remove_lru(&b1); // take page off B1
      a->ptr = replace();
    } else {
      a = remove_lru(&t1);  // take page off T1
      // if dirty, evict before overwrite
      if(a->dirty) im_put(a->page, a->ptr);
    }
  } else { // B1 + T1 have less than c pages
    a = remove_lru(&b2); // reuse B2's LRU
    a->ptr = replace();  // new place for page
  }

  ht_remove(a);

  insert_mru(&t1, a); // seen once recently, put on T1
  a->page = page;
  a->dirty = false;
  ht_insert(a);
  im_get(a->ptr, a->page); // load page into cache

  return a;
}


static ARC_CDB *init_cdb(ARC_CDB *cdb, u4 page, bool load_page) {
  cdb->page = page;
  cdb->dirty = 0;
  cdb->ptr = 0;

  if(load_page) {
    cdb->ptr = frames + page*MM_PAGE_SIZE;
    im_get(cdb->ptr, cdb->page);
  }

  ht_insert(cdb);

  return cdb;
}

void arc_init() {
  int i;

  memset(ht, 0, MM_HT_SIZE);

  init_list(&t1);
  init_list(&b1);
  init_list(&t2);
  init_list(&b2);

  target_t1 = 1;

  for(i = 0; i < MM_NFRAMES; i++)
    insert_mru(&t1, init_cdb(cdbt + i, i, true));


  for(; i < 2*MM_NFRAMES; i++)
    insert_mru(&b2, init_cdb(cdbt + i, i, false));
}

void arc_quit() {
  int i;
  for(i = 0; i < 2*MM_NFRAMES; i++) {
    ARC_CDB *cdb = cdbt + i;
    if(cdb->ptr && cdb->dirty)
      im_put(cdb->page, cdb->ptr);
  }
}

Name: Anonymous 2013-02-14 6:03

>>49
u8
You ate?

Name: Anonymous 2013-02-14 6:16

>>40
Use grease/tampermonkey?

Name: Anonymous 2013-02-14 8:08

>>50
u2

Name: Anonymous 2013-02-14 15:23

>>50
Is this somekind of a joke

Name: Anonymous 2013-02-14 16:15

>>44
First was written in C/C++
Wait, what the fuck, Ahmed Nikiketa?

Name: Anonymous 2013-02-14 19:14

>>53
No.

Name: Anonymous 2013-02-14 22:23

>>54
its true

Name: Anonymous 2013-02-14 23:44

I fucking love truth.

Name: Anonymous 2013-02-15 1:14

>>54
We were all fools to the pig disgusting imperative paradigm algol 86-esque syntaxed pile of undefined shit/undefined shit++ at some point in our lives.
Nikita was still young, it could be worse, he could've still been oblivious to LISP.

Name: Anonymous 2013-02-15 1:35

>>54
Well, you go to your local pirate market and you see only Windows 98SE and Visual Studio 6, so the choice was obvious.

Name: Anonymous 2013-02-15 1:37

>>59
You could also find Pascal in Russia.

Name: Anonymous 2013-02-15 1:56

>>60
If if you attend high school.

Name: Anonymous 2013-02-15 8:32

>>47
Why exactly would anyone want that?

Name: Anonymous 2013-02-20 10:01

>>1
code academy

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