Computer Architecture

  • Cache Optimization
    • Lower 3C:
      • +cache block size -> -compulsory -> +conflict
      • +cache capacity -> -capacity caused misses -> hit time
      • +associativity -> +parallel comparison
    • Lower cost of cache miss:
      • multi-layer cache(victim cache)
        • global miss rate vs. local miss rate, AMAT
        • If L2 cache is much larger than L1, the global miss rate is close to that with a single level cache of L2’s size
        • placeholder
    • placeholder
      • Small and simple first level caches
      • Critical timing path:
      • Direct-mapped caches can overlap tag compare and transmission
      • placeholder

Programming Languages

Refer to this page.

Since in OCaml the content of a function is not evaluated in its definition, the approach could be used to create lists with infinite length.

type 'a list = Nil | Cons of 'a * (unit -> 'a list);;

The good thing about it is that the function is not evaluated at once, so the infinite recursion is avoided.

And there is some other utilities:

let head x = let Cons(a, _) = x in a;;

let tail x = let Cons(_, b) = x in b ();;

let rec take n x = match n, x with
| _, Nil -> []
| 0, _ -> []
| n, Cons(h, tf) -> h :: take (n-1) (tf ());;

let rec drop n x = match n, x with
| _, [] -> []
| 0, x -> x
| n, Cons(h, tf) -> drop (n - 1) (tf ());;

let rec fmap f x = match x with
| Nil -> Nil
| Cons(h, tf) -> Cons(f h, fun () -> fmap f (tf ()));;

Note that () is of type unit in OCaml, not () in Haskell.

And we can have something like 1... now in OCaml:

let rec toinf = fun x -> Cons(x, fun () -> toinf (x + 1));;

Or better, some Fibonacci series:

let rec fib = fun x y -> Cons(x, fun () -> fib y (x + y));;

Argh.

This one, though it looks elegant, would run slow.

let rec toinfslow x = Cons(x, fun () -> fmap ((+) 1) (toinf x));;

Imagine: you get 20 in toinfslow 10 by adding to it 1 ten times.

And a even slower Fibonacci series:

let rec fibslow x y = Cons(x, fun () -> Cons(y, fun () -> sum (fibslow x y) (tail (fibslow x y))));;

Go with take 40 (fibslow 1 1) and you would not get the result as fast as the first one.

OCaml has a lazy module that would delay the evaluation of the expression, and also cache the result. So a lazy list would be faster after calculating once.

About Hacking Conferences

Chinese government has banned its security researchers from participating foreign security conferences this year, and Pwn2Own on Mar. 12-14, which Chinese dominated for years, was impacted by this new policy. And Zhou Hongyi, chief executor of 360, has previously stated that these loopholes ‘should remain in China’.

Learning Kana Input…

ろぬふあう えおやゆよ わほへ ` 1 2 3 4 5 6 7 8 9 0 - =

たていすか んなにらせ ゛゜む q w e r t y u i o p [ ] \

ちとしはき くまのりれ け a s d f g h j k l ; ’

つさそひこ みもねるめ z x c v b n m , . /

Use shift key for smaller kana. E.g. ゃ is entered with Shift + 7.

Misc

Was yea erra hymme sarla yorr.

About Vocaloid

  • Kemu was probably once troubled by Suzumu, a member of Kemu VOXX, and who had a similar style. Kemu came back with Haikei Doppelganger in 2017, which possibly refers to Suzumu.

  • After the admitting the ghostwriting of some of his songs, Suzumu announced that he would retire from making vocaloid songs in 2017. Which means the Bookmark of Demise Project stopped without ending.

  • Mafumafu is said to had bad terms with Suzumu, which brought a lot damage to him.

  • Powapowa-P, a.k.a. Shiina Mota, deceased at 20, with a red pen. The cause of his death was not revealed.

  • Samfree died at 31 from illness. Recommend his Promise, although a lot may have already known it from Project Diva.