x-wei.github.io
tech - mx's blog
http://x-wei.github.io/category/tech.html
Tech - mx's blog. Sat, 31 Dec 2016. 今年对FP语言特别感兴趣, 上了两门Scala的公开课( here. 在博客中写了一系列的笔记, 课后作业也都认真做完了. 斗胆说这两门语言都算入门了吧. 这里就随便写一下使用这两门语言的感受, 想到哪里写到哪里. FP语言和之前接触的语言确实不大一样, 比如之前我都有种错觉, 学什么语言只要知道循环/条件/基本类型运算怎么写, 就差不多可以上手了. 然后遇到了FP, 发现循环语句其实是不必要的. 记得看到过一篇文章, 类比学FP就好像开了很多种车的老司机突然开始学开宇宙飞船, 肯定各种WTF不适应了. 以前谈到FP我只能联想到一些Python里的FP特性: lambda表达式, 高阶函数之类的, 顶多还想到个闭包. 不过Python里面的FP特性和Scala/OCaml里的比起来还是差了不少: i.e. 现在非常希望Python里可以支持pattern matching. 习惯了就好, 就像java里所有东西都是final的, 要修改什么东西的时候改成新建一个, immutable数据的优点就是并行方便啊. 总结了一下C STL里...
x-wei.github.io
music - mx's blog
http://x-wei.github.io/category/music.html
Music - mx's blog. 寂静之声The Sound of Silence[Simon&Garfunkel]. Tue, 05 Jun 2012. 本来我是计划从老鹰的一首歌开始写的, 昨天甚至计划好了第一首就写Hotel California. BUT SOMEHOW, 决定第一首写它, 寂静之声(SoS). 如果把硬盘里的歌全部删了, 只能留十首歌的话, 我是肯定会留下这一首. 歌名: The Sound of Silence. 不必多说, 这首歌应该知名度很高的吧, 西蒙与加芬科的成名作. Simon&Garfunkel组合凭借电影 毕业生 的两首配乐被许多人所熟知(另一首是Scarborough Fair). 运筹的力量: 用线性规划解决Google 2014 HashCode问题. 2012 mx · 通过 Pelican.
x-wei.github.io
OCaml - mx's blog
http://x-wei.github.io/tag/ocaml.html
OCaml - mx's blog. Sat, 31 Dec 2016. 今年对FP语言特别感兴趣, 上了两门Scala的公开课( here. 在博客中写了一系列的笔记, 课后作业也都认真做完了. 斗胆说这两门语言都算入门了吧. 这里就随便写一下使用这两门语言的感受, 想到哪里写到哪里. FP语言和之前接触的语言确实不大一样, 比如之前我都有种错觉, 学什么语言只要知道循环/条件/基本类型运算怎么写, 就差不多可以上手了. 然后遇到了FP, 发现循环语句其实是不必要的. 记得看到过一篇文章, 类比学FP就好像开了很多种车的老司机突然开始学开宇宙飞船, 肯定各种WTF不适应了. 以前谈到FP我只能联想到一些Python里的FP特性: lambda表达式, 高阶函数之类的, 顶多还想到个闭包. 不过Python里面的FP特性和Scala/OCaml里的比起来还是差了不少: i.e. 现在非常希望Python里可以支持pattern matching. 习惯了就好, 就像java里所有东西都是final的, 要修改什么东西的时候改成新建一个, immutable数据的优点就是并行方便啊. OCaml MOOC...
x-wei.github.io
scala - mx's blog
http://x-wei.github.io/tag/scala.html
Scala - mx's blog. Sat, 31 Dec 2016. 今年对FP语言特别感兴趣, 上了两门Scala的公开课( here. 在博客中写了一系列的笔记, 课后作业也都认真做完了. 斗胆说这两门语言都算入门了吧. 这里就随便写一下使用这两门语言的感受, 想到哪里写到哪里. FP语言和之前接触的语言确实不大一样, 比如之前我都有种错觉, 学什么语言只要知道循环/条件/基本类型运算怎么写, 就差不多可以上手了. 然后遇到了FP, 发现循环语句其实是不必要的. 记得看到过一篇文章, 类比学FP就好像开了很多种车的老司机突然开始学开宇宙飞船, 肯定各种WTF不适应了. 以前谈到FP我只能联想到一些Python里的FP特性: lambda表达式, 高阶函数之类的, 顶多还想到个闭包. 不过Python里面的FP特性和Scala/OCaml里的比起来还是差了不少: i.e. 现在非常希望Python里可以支持pattern matching. 习惯了就好, 就像java里所有东西都是final的, 要修改什么东西的时候改成新建一个, immutable数据的优点就是并行方便啊. Lecture 2&...
x-wei.github.io
[OCaml MOOC] week3: MORE ADVANCED DATA STRUCTURES - mx's blog
http://x-wei.github.io/ocamlMOOC_wk3_advanced_ds.html
OCaml MOOC] week3: MORE ADVANCED DATA STRUCTURES - mx's blog. OCaml MOOC] week3: MORE ADVANCED DATA STRUCTURES. OCaml MOOC] week3: MORE ADVANCED DATA STRUCTURES. Mon, 21 Nov 2016. Part 4 of Introduction to Functional Programming in OCaml. 4 CASE STUDY: A STORY TELLER. 5 POLYMORPHIC ALGEBRAIC DATATYPES. Guard: pattern matching branch using when. Last week, we only defined. Which are nice to aggregate values but quite limited when you try to structure values. This week: algebraic datatypes. Functions on su...
x-wei.github.io
归档 - mx's blog
http://x-wei.github.io/archives.html
归档 - mx's blog. Sat, 31 Dec 2016. Thu, 29 Dec 2016. Sat, 26 Nov 2016. OCaml MOOC] week6: MODULES AND DATA ABSTRACTION. Wed, 23 Nov 2016. OCaml MOOC] week5: EXCEPTIONS, INPUT OUTPUT AND IMPERATIVE CONSTRUCTS. Tue, 22 Nov 2016. OCaml MOOC] week4: HIGHER ORDER FUNCTIONS. Mon, 21 Nov 2016. OCaml MOOC] week3: MORE ADVANCED DATA STRUCTURES. Sat, 12 Nov 2016. OCaml MOOC] week2: BASIC DATA STRUCTURES. Wed, 09 Nov 2016. Scala MOOC II] Lec4 - Timely Effects. Mon, 31 Oct 2016. Sun, 23 Oct 2016. Sat, 22 Oct 2016.
x-wei.github.io
misc - mx's blog
http://x-wei.github.io/category/misc.html
Misc - mx's blog. Thu, 31 Dec 2015. 三月初结束了在X的最后几门考试, X的课从来都不简单, 但我真的很享受, 尤其是那些数学课. Polytechnique, 从憧憬变成回忆. X的各种经历, 三天三夜也说不完. 然后九月来到ETH, 课程很有意思, project比较多. 第一个学期说实话有点应付, 所以现在要好好复习备考.orz. 在MEC实习了五个月, 这里的工作环境真是宽松. 一宽松我有点担心没有什么进步, 不过后来看这一段时间我的进步还是很大的. 实习期间做的是音乐分类工作, 实践了一些NLP的流程, 试用了不少算法, 以及读了一些paper. 有幸和神童Aranud(X11 major)一起工作, 感叹智商不够, 只能努力来凑. 然后顺利通过了实习的答辩, 算是给X的三年划上了圆满的句号 到2017年remise再见了! AL: 三轮电面, 深感ML方面的知识不够扎实, 不过居然过了, 看来他们真的很缺人. GG: 在充分的准备之后经历了两轮电面五轮现场, 拿下dream offer, 感觉很幸运 . Tue, 19 Feb 2013. Wed, 31 O...
x-wei.github.io
[Scala MOOC II] Lec 3: Functions and State - mx's blog
http://x-wei.github.io/progfun2_lec3_var.html
Scala MOOC II] Lec 3: Functions and State - mx's blog. Scala MOOC II] Lec 3: Functions and State. Scala MOOC II] Lec 3: Functions and State. Mon, 31 Oct 2016. Part 3 of Functional Program Design in Scala. Lecture 3.1 - Functions and State. Lecture 3.2 - Identity and Change. Lecture 3.3 - Loops. Lecture 3.4 - Extended Example: Discrete Event Simulation. Lecture 3.5 - Discrete Event Simulation: API and Usage. Lecture 3.6 - Discrete Event Simulation: Implementation and Test. When are 2 (. X and y are. Loop ...
x-wei.github.io
notes - mx's blog
http://x-wei.github.io/category/notes.html
Notes - mx's blog. OCaml MOOC] week6: MODULES AND DATA ABSTRACTION. Sat, 26 Nov 2016. Part 7 of Introduction to Functional Programming in OCaml. This week: programming-in-the-large using the module system of OCaml. 1 STRUCTURING SOFTWARE WITH MODULES. In large project: mangage high number of definitions abstractions built on top of other abstractions. Layers of abstractions: hide information. Divide program into components. Identifiers organised to avoid naming conflicts. Dot-notation: access module .
x-wei.github.io
[OCaml MOOC] week2: BASIC DATA STRUCTURES - mx's blog
http://x-wei.github.io/ocamlMOOC_wk2_basics_ds.html
OCaml MOOC] week2: BASIC DATA STRUCTURES - mx's blog. OCaml MOOC] week2: BASIC DATA STRUCTURES. OCaml MOOC] week2: BASIC DATA STRUCTURES. Sat, 12 Nov 2016. Part 3 of Introduction to Functional Programming in OCaml. Primary use of types: document your code. 2 TUPLES: positioned components. Pattern matching: observing components of tuple. Tuples in the machine. Structrual equality VS physical equaliity. 3 RECORDS: naming components. Pitfalls: shadowing a field name. 5 CASE STUDY: A SMALL TYPED DATABASE.