Upgrade to Pro — share decks privately, control downloads, hide ads and more …

7 languages in 30 minutes

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →
Avatar for Kimmy Leo Kimmy Leo
November 18, 2015

7 languages in 30 minutes

Avatar for Kimmy Leo

Kimmy Leo

November 18, 2015

More Decks by Kimmy Leo

Other Decks in Programming

Transcript

  1. contents 1. a linear memory based language 2. a pattern

    matchingbased language 3. a meta language 4. a stack based language 5. a (markup)language 6. a macro language 7. a modelinglanguage
  2. Pattern maching a = a; X = a; //=> X

    results a a(b, c) = X; //=> X results a(b, c) a(X, c) = a(b, Y); //=> X results b, Y results c [H|T] = [1,2,3,4,5]; //=> H results 1, T results [2,3,4,5]
  3. JVM bytecode 0: iconst_2 1: istore_1 2: iload_1 3: sipush

    1000 6: if_icmpge 44 9: iconst_2 10: istore_2 11: iload_2 12: iload_1 13: if_icmpge 31 16: iload_1 17: iload_2 18: irem 19: ifne 25 22: goto 38 25: iinc 2, 1 28: goto 11 31: getstatic #84; // Field java/lang/System.out:Ljava/io/PrintStream; 34: iload_1 35: invokevirtual #85; // Method java/io/PrintStream.println:(I)V 38: iinc 1, 1 41: goto 2 44: return
  4. represent a math expression × => a x b ?

    + , => a / b ? lim 0→2 sin => lim x -> 0 sin x ? ∑ 7 => SIGMA x 2 ?
  5. represent a math expression × => a \times b +

    , => \frac{a}{b} lim 0→2 sin => \lim_{x -> 0}{sin x} ∑ 7 => \sum{x^2}