akka
Actor里的偏函数与性能 https://hongjiang.info/akka-in-practice-1/
Patterns.ask 是使用一个临时创建的actor发消息而非自身 https://hongjiang.info/akka-patterns-ask-with-temporary-actor/
对actor的邮箱计数 https://hongjiang.info/akka-mailbox-counter-extension/
Never ever block an actor https://hongjiang.info/never-ever-block-an-actor/
模式匹配
话说模式匹配(1) 什么是模式?https://hongjiang.info/scala-pattern-matching-1/
话说模式匹配(2) scala里是怎么实现的? https://hongjiang.info/scala-pattern-matching-2/
话说模式匹配(3) 模式匹配的核心功能是解构!https://hongjiang.info/scala-pattern-matching-3/
话说模式匹配(4) 赋值语句与模式匹配 https://hongjiang.info/scala-pattern-matching-4/
话说模式匹配(5) for表达式中的模式匹配 https://hongjiang.info/scala-pattern-matching-5/
话说模式匹配(6) case类的细节 https://hongjiang.info/scala-pattern-matching-6/
话说模式匹配(7) 一个构造器模式的例子(by case class) https://hongjiang.info/scala-pattern-matching-7/
话说模式匹配(8) 一个抽取器的例子 https://hongjiang.info/scala-pattern-matching-8/
类型相关
scala类型系统:1) 类型与类 https://hongjiang.info/scala-type-and-class/
scala类型系统:2) classOf与getClass方法的差异 https://hongjiang.info/scala-type-system-classof-and-getclass/
scala类型系统:3) 单例类型 https://hongjiang.info/scala-type-system-singleton-type/
scala类型系统:4) 内部类,路径依赖类型&类型投影 https://hongjiang.info/scala-type-system-inner-type-and-type-projection/
scala类型系统:5) 结构类型 https://hongjiang.info/scala-type-system-structural-type/
scala类型系统:6) 复合类型与with关键字 https://hongjiang.info/scala-type-system-compund-type/
scala类型系统:7) 中缀类型 https://hongjiang.info/scala-type-system-infix-type/
scala类型系统:8) type关键字 https://hongjiang.info/scala-type-system-type-keyword/
scala类型系统:9) this别名&自身类型 https://hongjiang.info/scala-type-system-self-type/
scala类型系统:10) 交集类型与联合类型 https://hongjiang.info/scala-intersection-type-and-union-type/
scala类型系统:11) upper bounds & lower bounds https://hongjiang.info/scala-upper-bounds-and-lower-bounds/
scala类型系统:12) view bounds https://hongjiang.info/scala-type-system-view-bounds/
scala类型系统:13) context bounds https://hongjiang.info/scala-type-system-context-bounds/
scala类型系统:14) multiple bounds https://hongjiang.info/scala-type-system-multiple-bounds/
scala类型系统:15) 协变与逆变 https://hongjiang.info/scala-covariance-and-contravariance/
scala类型系统:16) 函数类型 https://hongjiang.info/scala-function-type/
scala类型系统:17) 结构类型的细节问题 https://hongjiang.info/scala-structural-type-detail/
scala类型系统:18) 不稳定(volatile)类型 https://hongjiang.info/scala-type-system-volatile-type/
scala类型系统:19) Manifest与TypeTag https://hongjiang.info/scala-type-system-manifest-vs-typetag/
scala类型系统:20) 数组类型 https://hongjiang.info/scala-type-system-array-type/
scala类型系统:21) type specialization与类爆炸 https://hongjiang.info/scala-type-specialization/
scala类型系统:22) 类型约束与特定方法 https://hongjiang.info/scala-type-contraints-and-specialized-methods/
scala类型系统:23) 用类型证明实现联合类型 https://hongjiang.info/scala-type-evidence-and-union-type/
scala类型系统:24) 理解 higher-kinded-type https://hongjiang.info/scala-higher-kinded-type/
scala类型系统:25) type lambda https://hongjiang.info/scala-type-lambda/
scala类型系统:26) type classes模式 https://hongjiang.info/scala-type-classes-pattern/
scala类型系统:27) 回顾常见的type classes https://hongjiang.info/scala-type-classes-review/
scala类型系统:28) 依赖类型 https://hongjiang.info/scala-type-system-dependent-types/
scala类型系统:case class与代数数据类型 https://hongjiang.info/scala-case-class-and-algebraic-data-type/
scala类型系统:类型推导 https://hongjiang.info/scala-type-inference/
scala类型系统:柯里-霍华德同构 https://hongjiang.info/scala-curry-howard-isomorphism/
scala类型系统:值类型与数组 https://hongjiang.info/scala-value-class-in-array/
scala类型系统:Null与Nothing,造型问题 https://hongjiang.info/scala-null-and-nothing/
scala类型系统:值类型的细节 https://hongjiang.info/scala-value-classes-detail/
scala类型系统:通用特质(universal traits) https://hongjiang.info/scala-universal-traits/
scala类型系统:值类型的装箱问题 https://hongjiang.info/scala-value-class-boxing-question/
scala类型系统:值类型的一些限制 https://hongjiang.info/scala-value-classes/
shapeless
shapeless(1): 从方法与函数的多态谈起 https://hongjiang.info/shapeless-1-polymorphic-question/
shapeless(2): 对函数(值)实现参数化多态 https://hongjiang.info/shapeless-2-polymorphic-function-impl/
类型推导相关
泛型方法转换为部分应用函数时的类型推导问题 https://hongjiang.info/generic-methods-2-partially-applied-functions/
spray
spray中的Magnet模式: typeclass的一种特定方式 https://hongjiang.info/spray-magnet-pattern/
monads & monoids
我所理解的monad(0) https://hongjiang.info/understand-monad-0/
我所理解的monad(1):半群(semigroup)与幺半群(monoid) https://hongjiang.info/semigroup-and-monoid/
我所理解的monad(2):fold与monoid https://hongjiang.info/fold-and-monoid/
我所理解的monad(3):半群(semigroup)与并行运算 https://hongjiang.info/semigroup-and-parallel/
我所理解的monad(4):函子(functor)是什么 https://hongjiang.info/understand-monad-4-what-is-functor/
我所理解的monad(5):自函子(Endofunctor)是什么 https://hongjiang.info/understand-monad-5-what-is-endofunctor/
我所理解的monad(6):从组合子(combinator)说起 https://hongjiang.info/understand-monad-6-combinator/
我所理解的monad(7):把monad看做行为的组合子 https://hongjiang.info/understand-monad-7-action-combinator/
翻译&笔记
Programming in Scala的阅读笔记 https://hongjiang.info/programming-in-scala-notes/
Effective Scala中文版 https://hongjiang.info/effective-scala-chinese/
翻译 monads-are-elephants 第一部分 https://hongjiang.info/monads-are-elephants-part1-chinese
翻译 monads-are-elephants 第二部分 https://hongjiang.info/monads-are-elephants-part2-chinese
翻译 monads-are-elephants 第三部分 https://hongjiang.info/monads-are-elephants-part3-chinese
scala pitfalls
scala雾中风景(0): 序 https://hongjiang.info/scala-pitfalls-0/
scala雾中风景(1): lambda表达式的缩写 https://hongjiang.info/scala-pitfalls-1/
scala雾中风景(2): 小括号与花括号 https://hongjiang.info/scala-pitfalls-2/
scala雾中风景(3): for表达式的背后 https://hongjiang.info/scala-pitfalls-3/
scala雾中风景(4): Unit类型 https://hongjiang.info/scala-pitfalls-4/
scala雾中风景(5): 中缀表达 https://hongjiang.info/scala-pitfalls-5/
scala雾中风景(6): 内部类与模式匹配 https://hongjiang.info/scala-pitfalls-6/
scala雾中风景(7): val x:Int = x + 1 的问题 https://hongjiang.info/scala-pitfalls-7/
scala雾中风景(8): 高阶函数与Unit的谜题 https://hongjiang.info/scala-pitfalls-8/
scala雾中风景(9): List(1,2,3) == Seq(1,2,3) ? https://hongjiang.info/scala-pitfalls-9/
scala雾中风景(10): 逆变点与协变点 https://hongjiang.info/scala-pitfalls-10/
scala雾中风景(11): isInstanceOf与类型擦拭 https://hongjiang.info/scala-pitfalls-11-type-erasure/
scala雾中风景(12): App特质的延迟初始化 https://hongjiang.info/scala-app-trait-delay-init/
scala雾中风景(13): 模式匹配中的逻辑或 https://hongjiang.info/scala-pitfalls-13/
scala雾中风景(14): trait的泛型参数为何不支持context bounds https://hongjiang.info/scala-pitfalls-14/
scala雾中风景(15): class A { type T }与class A[T] {} https://hongjiang.info/scala-pitfalls-15/
scala雾中风景(16): println(1,2,3)为什么work? https://hongjiang.info/scala-pitfalls-16/
scala雾中风景(17): toSet()的谜题 https://hongjiang.info/scala-pitfalls-17/
scala雾中风景(18): postfix operator的问题 https://hongjiang.info/scala-pitfalls-18/
scala雾中风景(19): MutableList与mutable.LinkedList的问题 https://hongjiang.info/scala-pitfalls-19/
scala雾中风景(20): MutableList迭代器的bug https://hongjiang.info/scala-pitfalls-20/
scala雾中风景(21): auto-tupling与auto-detupling https://hongjiang.info/scala-pitfalls-21-auto-tupling-and-auto-detupling/
scala雾中风景(22): var变量与赋值操作符 https://hongjiang.info/scala-pitfalls-22/
scala雾中风景(23): Nothing类型引发的NullPointerException https://hongjiang.info/scala-pitfalls-23-nothing-caused-npe/
scala雾中风景(24): break与异常捕获 https://hongjiang.info/scala-pitfalls-24/
scala雾中风景(25): try-finally表达式的类型推导 https://hongjiang.info/scala-pitfalls-25-try-finally-expr-type-infer/
scala雾中风景(26): 变量查找的问题 https://hongjiang.info/scala-pitfalls-26/
诊断
scala的诊断方法(1) 使用-Xprint:typer看语法糖的背后 https://hongjiang.info/scala-diagnose-1/
scala的诊断方法(2) 在repl下用reify查看表达式的翻译结果 https://hongjiang.info/scala-diagnose-2/
scala的诊断方法(3) 在repl下统计方法的执行时间 https://hongjiang.info/scala-diagnose-3/
scala的诊断方法(4) -Ytyper-debug 编译项 https://hongjiang.info/scala-diagnose-4/
scala的诊断方法(5) 用scalac-aspects诊断scalac各阶段耗时 https://hongjiang.info/scalac-aspects/
函数与函数式风格
无参方法与小括号问题 https://hongjiang.info/scala-parenthesis-and-apply/
scala中的无参方法与统一访问原则 https://hongjiang.info/scala-uniform-access-principle/
scala中的eta-conversion https://hongjiang.info/scala-eta-conversion/
闭包变量绑定问题 https://hongjiang.info/closure-var-banding/
如何写一段符合scala语言习惯的快速排序 https://hongjiang.info/scala-quicksort/
Any.##方法与hashCode的区别 https://hongjiang.info/double-pound-sign-and-hashcode/
scala中的有名参数 https://hongjiang.info/scala-named-arguments/
map函数,隐式参数CanBuildFrom的细节 https://hongjiang.info/scala-canbuildfrom-detail/
scala中函数类型的多态 https://hongjiang.info/scala-function-polymorphic/
scala不是函数式语言,与Ocaml的对比 https://hongjiang.info/scala-vs-ocaml/
foldLeft与foldRight https://hongjiang.info/foldleft-and-foldright/
再谈eta-conversion与eta-expansion https://hongjiang.info/eta-conversion-and-eta-expansion/
柯里化(currying)与构造器(Builder)模式 https://hongjiang.info/currying-and-builder-pattern/
集合相关
对tuple进行迭代 https://hongjiang.info/tuple-iterator/
String当作集合处理时的方法 https://hongjiang.info/string-as-collection/
scala中集合的交集、并集、差集 https://hongjiang.info/scala-union-diff-intersect/
Tuple1的存在意义?https://hongjiang.info/tuple1-purpose/
为什么scala中的tuple定义了22个(Tuple22)? https://hongjiang.info/why-tuples-only-to-22/
二元组箭头表达式背后的语法糖 https://hongjiang.info/scala-any2arrowassoc/
通过List.apply方法构造List的背后逻辑 https://hongjiang.info/scala-list-apply/
API pitfalls
scala类库中的api陷阱(1): LinkedList.append https://hongjiang.info/scala-api-pitfalls-1/
REPL相关
repl杂记 https://hongjiang.info/repl-misc/
repl下的几种模式 https://hongjiang.info/scala-repl-modes/
repl下的javap https://hongjiang.info/scala-repl-javap/
scala2.11的repl下增加了kind命令 https://hongjiang.info/scala-repl-kind/
scala 2.10+
scala2.10中eval一段script https://hongjiang.info/scala210-eval-script/
scala2.10.1的repl下:cp命令不能工作 https://hongjiang.info/scala210-repl-cp-do-not-work/
scala2.10中采纳了SIP-18:模块化语言特性 https://hongjiang.info/scala-sip-18/
scala2.10里的for表达式已经不允许对变量声明val https://hongjiang.info/for-comprehension-val-definition/
scala2.11编译环节的一些变动: delambdafy https://hongjiang.info/scala-compiler-delambdafy/
scala2.11编译器对lint的增强 https://hongjiang.info/scala-211-compiler-lint/
未分类
lazy变量与双重检测锁(DCL) https://hongjiang.info/scala-lazy-and-dcl/
scala里的静态代理(static-forwarders) https://hongjiang.info/scala-static-forwarders/
统计诗经中最常使用的叠词 https://hongjiang.info/scala-counting…ated-character/
scala2.9中@serializable注释已不鼓励使用 https://hongjiang.info/serializable-annotation-deprecated/
import _root_.xxx 中的_root_前缀表示xxx包名是绝对路径 https://hongjiang.info/scala-package-root-prefix/
scala中执行外部命令(scala.sys.process) https://hongjiang.info/scala-process/
classloader问题:import my.package._ 是否会load该包下所有的class? https://hongjiang.info/classloader-question-on-import-classes/
scala中有Unicode的关键字 https://hongjiang.info/scala-unicode-reserved-words/
Any类的源码在哪儿?https://hongjiang.info/cannot-find-soucecode-of-class-any/
scala编译器的一个bug https://hongjiang.info/scala-compiler-bug/
scala bug系列:2.10编译器把单例当作类型的bug https://hongjiang.info/scala-bug-210-object-as-type/
scala里模拟javascript/python里的生成器的效果 https://hongjiang.info/scala-simulate-javascript-generator/
null造型为值类型时为何不抛异常 https://hongjiang.info/null-cast-to-value-type/
Int与Integer的拆箱问题 https://hongjiang.info/scala-int-unbox-for-null/
Scala函数式编程中文版已上架 https://hongjiang.info/functional-programming-in-scala-chinese-version/
scalastyle工具 https://hongjiang.info/scala-style-checker/
分享与交流
分享ppt: scala中的函数与闭包 https://hongjiang.info/scala-function-and-closure/
与19楼的交流 https://hongjiang.info/scala-19lou/
上海scala爱好者聚会(2013) https://hongjiang.info/scala-shanghai-512/
阿里技术嘉年华2013 https://hongjiang.info/adc2013/
2013华东scala爱好者聚会(杭州) https://hongjiang.info/scala-hangzhou-2013-1019/
华东地区scala爱好者聚会(2014上海) https://hongjiang.info/scala-shanghai-2014/
华东地区scala爱好者聚会(2015上海) https://hongjiang.info/scala-shanghai-2015/
Scala在挖财的应用实践 https://hongjiang.info/scala-in-wacai/
ArchSummit北京2015小记 https://hongjiang.info/archsummit-beijing-2015/
依赖注入
Cake Pattern与依赖注入 https://hongjiang.info/cake-pattern-and-di/
scala中的self type(自身类型)与依赖注入 https://hongjiang.info/scala-self-type-and-di/
阅读了大部分博主关于scala的博客,感觉受益匪浅,请问博主有没有意向写一些scalding相关的博客。感觉scalding很强大,但是自己的认识实在太有限
最近系统的学习了下Scala / Play2.
感觉函数式编程果然是博大精深。 Play中的Enumerator/Iteratee让我耳目一新。 翻了下源代码, 感觉脑子不够用, 看了1天还是很晕,
群主是否有研究过Enumerator/Iteratee, 或是认识谁在研究? 我看了下章燁明关于Iteratee的ppt. 感觉还是不够细。
群主 要是能来个Iteratee源代码分析就好了。
http://mandubian.com/2012/08/27/understanding-play2-iteratees-for-normal-humans/
多看看这篇文感觉会好很多的
http://stackoverflow.com/questions/26952366/is-haskells-laziness-an-elegant-alternative-to-pythons-generators 也可以一看,好知道iteratoree的根源和变种。
博主您好,想请教个隐式转换的问题。 如果定义了一个隐式转换,但在它作用域内, 有一个值我不想被隐式转换掉呢? 该怎么规避?
隐式转换的话似乎没有办法,最好使用隐式参数替代隐式转换。
给自身加个转换后的对象没有的方法,然后调用这个方法hold它即可。办法有很多吧。
搜到博主的文章,受益匪浅。没想到还有这么多喜欢Scala的大神,让我感到并没有孤军奋战,甚是欣慰!
Scala在大数据领域是一门主流语言。
哈哈哈,是的
Quote: “….没想到还有这么多喜欢Scala的大神,让我感到并没有孤军奋战,甚是欣慰!….”
==================================
同感. 可惜自己公司还是没几个人用, 工作中还是一个人奋战..
学习了
感觉找到了金库,感谢前辈!
好赞呀,感谢前辈经验分享。我目前是一个统计学的研二学生,马上面临秋招找工作的问题,之前研一的时候上过大数据分析的课,就是使用scala spark,当时全靠自己自学了scala的基本用法,然后直接就上手spark ml了,前辈说的这些完全没有接触过。现在在一个互联网公司didi实习,推荐算法岗,由于公司处理部署XGB模型都是spark的,于是捡起scala来,最近检索scala文档时看到其他前辈的前辈找到这里来,读到您关于monads那部分简直不要太棒,因为我本科就是学基础数学的,以前学的抽象代数本以为以后再也不会用到,现在发现,群论范畴论与函数式编程结合起来,太有意思的。但我现在也没时间去学习这些,我现在像是有点不务正业,另外以后感觉基本用不到那些东西,所以会想只学一下基础用法能用scala来写写spark的一些接口的调用就行。但另一方面其实又觉得社会上这种算法岗也就是调调包调调参不是搞研究没意思,想还是找一些自己觉得有意思的工作像scala的半群与并行计算这块。就很迷茫,不知道日后该找什么样的工作了。
如果你是2022年研究生毕业的话,可以给我投简历,我们在招实习生。hongjiang.wanghj(at)alibaba-inc.com
什么部门呀
招聘已关闭